SyncObject.Progress Event (Outlook)

Occurs periodically while Microsoft Outlook is synchronizing a user’s folders using the specified Send\Receive group.

Syntax

expression .Progress(State, Description, Value, Max)

expression A variable that represents a SyncObject object.

Parameters

Name

Required/Optional

Data Type

Description

State

Required

OlSyncState

A value that identifies the current state of the synchronization process.

Description

Required

String

A textual description of the current state of the synchronization process.

Value

Required

Long

Specifies the current value of the synchronization process (such as the number of items synchronized).

Max

Required

Long

The maximum that Value can reach. The ratio of Value to Max represents the percent complete of the synchronization process.

Remarks

This event is not available in Microsoft Visual Basic Scripting Edition (VBScript).

Example

This Microsoft Visual Basic for Applications (VBA) example shows the progress of synchronization. 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 Outlook.

Public WithEvents mySync As Outlook.SyncObject 
 
Sub Initialize_handler() 
 Set mySync = Application.Session.SyncObjects.Item(1) 
 mySync.Start 
End Sub 
 
Private Sub mySync_Progress(ByVal State As Outlook.OlSyncState, ByVal Description As String, ByVal Value As Long, ByVal Max As Long) 
 If Not Description = "" Then 
 MsgBox Description 
 End If 
End Sub

See Also

Concepts

SyncObject Object

SyncObject Object Members