OL2000: SyncObject.Start Causes Fatal Error in Outlook

ID: Q241917


The information in this article applies to:
  • Microsoft Outlook 2000


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 this to be a problem in the Microsoft products 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:

Q146636 OL2000: Questions About Custom Forms and Outlook Solutions

Additional query words: OutSol OutSol2000 OL2K page fault fail stop exception

Keywords :
Version : WINDOWS:2000
Platform : WINDOWS
Issue type : kbbug


Last Reviewed: December 23, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.