OL2000: SyncObject.Start Causes Fatal Error in Outlook (241917)



The information in this article applies to:

  • Microsoft Outlook 2000

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
				

REFERENCES

For additional information about available resources and answers to commonly asked questions about Microsoft Outlook 2000 solutions, please click the article number below to view the article in the Microsoft Knowledge Base:

146636 OL2000: Questions About Custom Forms and Outlook Solutions


Modification Type:MajorLast Reviewed:9/29/2003
Keywords:kbbug kbnofix KB241917