cancel Outlook sync in SyncStart event

  • Thread starter Thread starter Jason Grimme
  • Start date Start date
J

Jason Grimme

Hello,

I am using the SyncStart event in Outlook 2003 to start a VPN
connection. I have the ability to determine the status of the
connection and would like to cancel the sync attempt if the VPN
connection failed.

I've tried calling mySync.Stop, but it does not seem to *cancel* the
synchronization attempt.

I also use the SyncEnd event when finished. Is there a way to "goto"
the SyncEnd and skip the syncing?

Any ideas would be great, thx!!
 
Is this a manual synch or one that's automatically started? If you start the
synch by calling mySynch.Start you should be able to stop it by calling the
..Stop method. See the example in the Object Browser Help on SyncObject for
an example of that. If it's an automatic synch you have no control over it.
 
It is a manual sync, started via F9 and/or Tools->Send/Receive...
(which I believe is the only way to use SyncStart event)

However, even though I have the mySync.Stop in the event procedure,
the sync still runs.

-jg
 
You can only stop synchs that you start yourself in code. You can't stop
ones started using F9 or Send/Receive. You can start a synch yourself in
code using the Start method of a SyncObject.
 
Thanks Ken,

I was aware that I can start a sync using code, but as I understand
then I do not have access to the SyncEnd event, correct?

-jg
 
Back
Top