'TO DO: If you use the Microsoft Outlook 11.0 Object Library, uncomment the following line.'Imports Outlook = Microsoft.Office.Interop.OutlookModule Module1 Sub Main() ' Create an Outlook application. Dim oApp As Outlook._Application = New Outlook.Application ' Create the name space. Dim oNS As Outlook._NameSpace = oApp.GetNamespace("mapi") Dim oSyncs As Outlook.SyncObjects Dim oSync As Outlook.SyncObject Try ' Reference SyncObjects. oSyncs = oNS.SyncObjects oSync = oSyncs.Item("All Accounts") ' Send and receive. oSync.Start() Catch ex As Exception Console.WriteLine(ex.Message) End Try ' Clean up. oSync = Nothing oSyncs = Nothing oNS = Nothing oApp = Nothing End SubEnd Module