Edytuj

Udostępnij za pośrednictwem


Sync Interface

Definition

This object, member, or enumeration is deprecated and is not intended to be used in your code.Use the Sync object to manage the synchronization of the local and server copies of a shared document stored in a Windows SharePoint Services document workspace.

public interface class Sync : Microsoft::Office::Core::_IMsoDispObj
[System.Runtime.InteropServices.Guid("000C0386-0000-0000-C000-000000000046")]
public interface Sync : Microsoft.Office.Core._IMsoDispObj
[<System.Runtime.InteropServices.Guid("000C0386-0000-0000-C000-000000000046")>]
type Sync = interface
    interface _IMsoDispObj
Public Interface Sync
Implements _IMsoDispObj
Attributes
Implements

Remarks

The Sync property of the Microsoft Office Word 2003 Document object, the Microsoft Office Excel 2003 Workbook object, and the Microsoft Office PowerPoint 2003 Presentation object returns a Sync object.

The Status property returns important information about the current state of synchronization. Use the GetUpdate() method to refresh the sync status. Use the LastSyncTime, ErrorType, and WorkspaceLastChangedBy properties to return additional information.

See the Status property for additional information on the differences and conflicts that can exist between the local and server copies of shared documents.

Use the PutUpdate() method to save local changes to the server. Close and re-open the document to retrieve the latest version from the server when no local changes have been made. Use the ResolveConflict(MsoSyncConflictResolutionType) method to resolve differences between the local and the server copies, or the OpenVersion(MsoSyncVersionType) method to open a different version alongside the currently open local version of the document.

The GetUpdate, PutUpdate, and ResolveConflict methods of the Sync object do not return status codes because they complete their tasks asynchronously. The Sync object provides important status information through a single event, which the developer can access through the following application-specific events:

The Sync event described above returns an MsoSyncEventType value.

The Sync object model is available whether sharing and synchronization are enabled or disabled on the active document. The Sync property of the Document, Workbook, and Presentation objects does not return Nothing when the active document is not shared or synchronization is not enabled. Use the Status property to determine whether the document is shared and whether synchronization is enabled.

Not all document synchronization problems raise trappable run-time errors. After using the methods of the Sync object, it's a good idea to check the Status property; if the Status property is msoSyncStatusError, check the ErrorType property for additional information on the type of error that has occurred.

In many circumstances, the best way to resolve an error condition is to call the GetUpdate method. For example, if a call to PutUpdate results in an error condition, then a call to GetUpdate will reset the status to msoSyncStatusLocalChanges.

Properties

Application

Returns an Application object that represents the container application for the object.

Creator

Returns a 32-bit integer that indicates the application in which the specified object was created.

ErrorType

Returns a constant which indicates the type of the most recent document synchronization error.

LastSyncTime

Returns the date and time when the local copy of the active document was last synchronized with the server copy.

Parent

Returns the Parent object for the specified object.

Status

Returns the status of the synchronization of the local copy of the active document with the server copy.

WorkspaceLastChangedBy

Displays the friendly name of the user who last saved changes to the server copy of a shared document.

Methods

GetUpdate()

Compares the local version of the shared document to the version on the server.

OpenVersion(MsoSyncVersionType)

Opens a different version of the shared document alongside the currently open local version.

PutUpdate()

Updates the server copy of the shared document with the local copy.

ResolveConflict(MsoSyncConflictResolutionType)

Resolves conflicts between the local and the server copies of a shared document.

Unsuspend()

Resumes synchronization between the local copy and the server copy of a shared document.

Applies to