Microsoft KB Archive/241917

= OL2000: SyncObject.Start Causes Fatal Error in Outlook =

Article ID: 241917

Article Last Modified on 9/29/2003

-

APPLIES TO


 * Microsoft Outlook 2000 Standard Edition

-



This article was previously published under Q241917



SYMPTOMS
You try to programmatically synchronize folders using the Microsoft Outlook object model, but when you run your code a fatal error occurs.



RESOLUTION
Set an object variable to the SyncObjects collection, set an object variable to the individual syncronization profile you want to use, and then use the Start method on the SyncObject variable.

For example, the following Microsoft Outlook Visual Basic for Applications code will successfully start the synchronization process:

Dim colSyncObjects As Outlook.SyncObjects Dim objSyncObject As Outlook.SyncObject

Sub StartSync Set colSyncObjects = Session.SyncObjects Set objSyncObject = colSyncObjects("All Folders") objSyncObject.Start End Sub



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.



MORE INFORMATION
The Start and Stop methods can be used to programmatically start or stop a synchronization process. This feature is new to the Outlook 2000 object model and allows you to programmatically control the new "quick synchronization" groups available in Outlook.

For more information on the Outlook synchronization features, see the About synchronization topic in online Help.

Steps to Reproduce Problem
Either of the following two code samples will cause Outlook to generate a fatal error. It does not matter if you declare object variables prior to using them. Dim objSyncObject As Outlook.SyncObject

Sub StartSync Set objSyncObject = Session.SyncObjects("All Folders") objSyncObject.Start End Sub Sub StartSync Session.SyncObjects("All Folders").Start End Sub

