Sync Object Events

A child object of the NameSpace object, SyncObject represents a Send/Receive group that controls offline synchronization in Outlook 2002. In Outlook 2000, a Send/Receive group is known as a Quick Synchronization group. You cannot establish a SyncObject programmatically by using an Add method of the SyncObjects collection object. Both the SyncObjects collection object and the SyncObject object are read-only objects, meaning that you cannot change the properties of a SyncObject or create a new SyncObject programmatically. You can, however, create a SyncObject (known in Outlook 2002 as a Send/Receive group) through the Outlook user interface. For additional information about creating and modifying Send/Receive groups, see "Make the Folder Available for Offline Use" in Chapter 8. "Folders."

NEW TO OUTLOOK 2002 Although you cannot create a SyncObject programmatically, there is one SyncObject you can modify programmatically in Outlook 2002: the Application Folders SyncObject. By using the InAppFolderSyncObject property of a MAPIFolder object, you can programmatically synchronize folders for the Application Folders SyncObject. If the Application Folders Send/Receive group does not exist when you set InAppFolderSyncObject to True, the Application Folders SyncObject is created automatically. The user does not have to create this group through the Outlook user interface. Keep in mind that other properties of the Application Folders Send/Receive group must be modified through the user interface. You cannot programmatically control other Send/Receive settings such as Synchronize Forms, Download Offline Address Book, or Make Folder Home Pages Available Offline.

If you need to enumerate the defined SyncObjects for the current logged-on user, use the SyncObjects collection object of the NameSpace object. Figure 9-10 illustrates a UserForm populated with Send/Receive groups. The following code block demonstrates how to populate a list box with SyncObjects and start synchronization when the user clicks the Start Sync command button. Notice that a default group of All Folders is defined, in addition to custom Send/Receive groups.

Was this article helpful?

0 0

Post a comment