Partager via


SyncEnd Event

Occurs immediately after Microsoft Outlook finishes synchronizing a user's folders using the specified Send\Receive group. This event is not available in Microsoft Visual Basic Scripting Edition (VBScript).

Subobject**_SyncEnd()**

*object   * An expression that evaluates to a SyncObject object.

Example

This Microsoft Visual Basic/Visual Basic for Applications (VBA) example displays a message when synchronization is complete. The sample code must be placed in a class module, and the Initialize_handler routine must be called before the event procedure can be called by Microsoft Outlook.

Dim myOlApp As New Outlook.Application
Dim WithEvents mySync As Outlook.SyncObject

Sub Initialize_handler()
 Set mySync = myOlApp.Session.SyncObjects.Item(1)
 mySync.Start
End Sub
   
Private Sub mySync_SyncEnd()
 MsgBox "Synchronization is complete."
End Sub

Applies to | SyncObject Object

See Also | OnError Event | Progress Event | Stop Method | SyncObjects Object | SyncStart Event | Using events with Automation