A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Unable to stop outlook to sync with IMAP account



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old September 14th 09, 11:07 AM posted to microsoft.public.outlook.program_addins
Stop method of Sync object is not workin[_2_]
external usenet poster
 
Posts: 9
Default 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.
Ads
 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 10:07 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright 2004-2014 Outlook Banter.
The comments are property of their posters.