NameSpace.SyncObjects Property (Outlook)

Office 2013 and later

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Returns a SyncObjects collection containing all Send\Receive groups. Read-only.

expression .SyncObjects

expression A variable that represents a NameSpace object.

This Microsoft Visual Basic for Applications (VBA) example displays all the Send and Receive groups set up for the user and starts the synchronization based on the user’s response.

Public Sub Sync() 
 Dim nsp As Outlook.NameSpace 
 Dim sycs As Outlook.SyncObjects 
 Dim syc As Outlook.SyncObject 
 Dim i As Integer 
 Dim strPrompt As Integer 
 Set nsp = Application.GetNamespace("MAPI") 
 Set sycs = nsp.SyncObjects 
 For i = 1 To sycs.Count 
 Set syc = sycs.Item(i) 
 strPrompt = MsgBox("Do you wish to synchronize " & syc.Name &"?", vbYesNo) 
 If strPrompt = vbYes Then 
 End If 
End Sub