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

表达式expression. 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

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.