Stop Method Example

This Microsoft Visual Basic/Visual Basic for Applications example interrupts synchronization of the user’s second synchronization profile in response to the user clicking a button on a form. The mySyncObj variable is declared as a public variable so it can be referenced by other modules.

Public mySyncObj As Outlook.SyncObject

Private Sub Command2_Click()
    MsgBox "Synchronization stopped by user."
    mySyncObj.Stop
End Sub