SyncObject.SyncStart 事件 (Outlook)SyncObject.SyncStart Event (Outlook)

Microsoft Outlook 开始同步使用指定发送 \ 接收组的用户的文件夹时发生。Occurs when Microsoft Outlook begins synchronizing a user's folders using the specified Send\Receive group.

语法Syntax

expressionexpression. SyncStart

_表达式_一个表示SyncObject对象的变量。expression A variable that represents a SyncObject object.

注解Remarks

该事件在 Microsoft Visual Basic Scripting Edition (VBScript) 中不可用。This event is not available in Microsoft Visual Basic Scripting Edition (VBScript).

示例Example

本 Visual Basic for Applications (VBA) 示例显示一条消息,告知用户同步可能需要很长时间的。This Visual Basic for Applications (VBA) example displays a message telling the user that the synchronization might take a long time. 示例代码必须放在类模块中,并且在 Microsoft Outlook 调用该事件过程前必须调用 Initialize_handler 例程。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 WithEvents mySync As Outlook.SyncObject 
 
Sub Initialize_handler() 
 Set mySync = Application.Session.SyncObjects.Item(1) 
 mySync.Start 
End Sub 
 
Private Sub mySync_SyncStart() 
 MsgBox "Synchronization is about to start. It might take a long time to complete." 
End Sub

另请参阅See also

SyncObject 对象SyncObject Object