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.
here i am using c#..

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()

Thanks in advance.

Votes + Comments
Use code tags.
9 Years
Discussion Span
Last Post by Ramy Mahrous
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.