本文為機器翻譯文章。如需檢視英文版,請選取 [原文] 核取方塊。您也可以將滑鼠指標移到文字上,即可在快顯視窗顯示英文原文。
譯文
原文

DocumentBase.DocumentLibraryVersions 屬性

 

取得 DocumentLibraryVersions 集合,代表已啟用版本控制且儲存在伺服器上之文件庫的共用文件版本集合。

命名空間:   Microsoft.Office.Tools.Word
組件:  Microsoft.Office.Tools.Word.v4.0.Utilities (於 Microsoft.Office.Tools.Word.v4.0.Utilities.dll)

public DocumentLibraryVersions DocumentLibraryVersions { get; }

The following code example displays a message that shows the total number of document versions if versioning is enabled in the document. To use this example, run it from the ThisDocument class in a document-level project.

private void DocumentDocumentLibraryVersions()
{
    Office.DocumentLibraryVersions dlvVersions = this.DocumentLibraryVersions;
    string strVersionInfo;
    if (dlvVersions.IsVersioningEnabled == true)
    {
        strVersionInfo = "This docment has " + dlvVersions.Count +
            " versions";
    }
    else
    {
        strVersionInfo = "Versioning is not enabled for this document.";
    }

    MessageBox.Show(strVersionInfo, "Version Information", MessageBoxButtons.OK);
}
回到頁首
顯示: