This documentation is archived and is not being maintained.

Workbook.Sync Property

Gets a Microsoft.Office.Core.Sync object that provides access to the methods and properties of documents that are part of a Document Workspace.

Namespace: Microsoft.Office.Tools.Excel
Assembly: Microsoft.Office.Tools.Excel (in microsoft.office.tools.excel.dll)

public virtual Sync Sync { get; }

Property Value

A Microsoft.Office.Core.Sync object that provides access to the methods and properties of documents that are part of a Document Workspace.

The following code example uses the SharedWorkspace property to determine whether the current workbook is part of a Document Workspace. If the workbook is part of a Document Workspace, then the example uses the Sync property to display the user who last changed the document.

private void DisplayLastChangeBy()
{
    if (this.SharedWorkspace.Connected)
    {
        MessageBox.Show("Last changed by: " +
            this.Sync.WorkspaceLastChangedBy);
    }
    else
    {
        MessageBox.Show("The current document is not connected " +
            "to a shared workspace.");
    }
}

Show: