If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
Unable to stop outlook to sync with IMAP account
Hi All
my outlook profile handles two accounts one is of exchange and another one is of IMAP. Out of these two accounts I want to sync with IMAP account in certain cases only(like when system is idle or when exchange is offline) For achieving this I have created an Outlook Add in that handles Syncstart event, when sync start is fired I am just stopping that by Stop() method of Sync object. I have tried below code but was not able to stop the sync. Can anybady help me on this. private NameSpace ns; ns = ThisAplication.Session; private Microsoft.Office.Interop.Outlook.SyncObjectClass mySyncObject; public void OnStartupComplete(ref System.Array custom) { mySyncObject = (SyncObjectClass)ns.SyncObjects[1]; mySyncObject.SyncStart += new Microsoft.Office.Interop.Outlook.SyncObjectEvents_ SyncStartEventHandler(mySyncObject_SyncStart); } private void mySyncObject_SyncStart() { ns.SyncObjects[1].Stop(); } Thanks in advance. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Unable to stop outlook to sync with IMAP account | Stop method of Sync object is not workin | Outlook - General Queries | 1 | September 14th 09 09:35 AM |
I am unable to send e-mails -unable to download files from IMAP. | ajmtextiles | Outlook - General Queries | 1 | August 1st 06 03:50 PM |
sync 4 outlook computers so i can stop using my pda | Mr Hot Shot | Outlook - Calandaring | 4 | March 7th 06 02:44 PM |
Outlook 2003 changes the outgoing account when unable to send by selected account | HeidarV | Outlook - General Queries | 1 | January 16th 06 02:26 PM |
Outlook 2003 changes the outgoing account when unable to send by selected account | HeidarV | Outlook - General Queries | 0 | January 14th 06 08:44 AM |