Syntax

expression.Status

expression Required. A variable that represents a object.

Remarks

Use the Status property to determine whether the local copy of the active document is synchronized with the shared server copy. Use the GetUpdate method to refresh the status. Use the following methods and properties when appropriate to respond to various status conditions:

The Status property returns a single constant from the list in the following order of precedence:

  1. msoSyncStatusNoSharedWorkspace
  2. msoSyncStatusError
  3. msoSyncStatusSuspended
  4. msoSyncStatusConflict
  5. msoSyncStatusNewerAvailable
  6. msoSyncStatusLocalChanges
  7. msoSyncStatusLatest

Example

The following example examines the Status property and takes an appropriate action to synchronize the local and server copies of the document if necessary.

Visual Basic for Applications
 Dim objSync As Office.Sync Dim strStatus As String Set objSync = ActiveDocument.Sync If objSync.Status > msoSyncStatusNoSharedWorkspace Then Select Case objSync.Status Case msoSyncStatusConflict objSync.ResolveConflict msoSyncConflictMerge ActiveDocument.Save objSync.ResolveConflict msoSyncConflictClientWins strStatus = "Conflict resolved by merging changes." Case msoSyncStatusError strStatus = "Last error type: " & objSync.ErrorType Case msoSyncStatusLatest strStatus = "Document copies already in sync." Case msoSyncStatusLocalChanges objSync.PutUpdate strStatus = "Local changes saved to server." Case msoSyncStatusNewerAvailable strStatus = "Newer copy available on the server." Case msoSyncStatusSuspended objSync.Unsuspend strStatus = "Synchronization resumed." End Select Else strStatus = "Not a shared workspace document." End If MsgBox strStatus, vbInformation + vbOKOnly, "Sync Information" Set objSync = Nothing 

See also: