Sdílet prostřednictvím


DocumentBase.DocumentLibraryVersions – vlastnost

Získává DocumentLibraryVersions kolekce představuje kolekce verzí sdílený dokument obsahující Správa verzí povolena, který je uložen v knihovna dokumentů na serveru.

Obor názvů:  Microsoft.Office.Tools.Word
Sestavení:  Microsoft.Office.Tools.Word.v4.0.Utilities (v Microsoft.Office.Tools.Word.v4.0.Utilities.dll)

Syntaxe

'Deklarace
Public ReadOnly Property DocumentLibraryVersions As DocumentLibraryVersions
    Get
public DocumentLibraryVersions DocumentLibraryVersions { get; }

Hodnota vlastnosti

Typ: Microsoft.Office.Core.DocumentLibraryVersions
A DocumentLibraryVersions kolekce.

Příklady

Následující příklad kódu zobrazí zpráva, že pokud je povolena Správa verzí zobrazuje celkový počet verzí dokumentu v dokumentu. Chcete-li použít tento příklad spustit z ThisDocument třídy v projektu úrovni dokumentu.

Private Sub DocumentDocumentLibraryVersions()
    Dim dlvVersions As Office.DocumentLibraryVersions = Me.DocumentLibraryVersions
    Dim strVersionInfo As String
    If dlvVersions.IsVersioningEnabled = True Then
        strVersionInfo = "This docment has " & dlvVersions.Count & " versions"
    Else
        strVersionInfo = "Versioning is not enabled for this document."
    End If

    MessageBox.Show(strVersionInfo, "Version Information", MessageBoxButtons.OK)
End Sub
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);
}

Zabezpečení rozhraní .NET Framework

Viz také

Odkaz

DocumentBase Třída

Microsoft.Office.Tools.Word – obor názvů