DocumentBase.DocumentLibraryVersions – vlastnost
Získá DocumentLibraryVersions kolekce, která představuje kolekci verzí sdílený dokument obsahující povolena Správa verzí, která je uložena v knihovně 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
public DocumentLibraryVersions DocumentLibraryVersions { get; }
Hodnota vlastnosti
Typ: Microsoft.Office.Core.DocumentLibraryVersions
Kolekce DocumentLibraryVersions.
Příklady
Následující příklad kódu zobrazí zprávu, která ukazuje celkový počet verze dokumentu, pokud je povolena Správa verzí v dokumentu.Chcete-li tento příklad použít, spusťte jej ze třídy ThisDocument v projektu na ú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
- Plná důvěra přímému volajícímu. Částečně zabezpečený kód nemůže tento člen použít. Další informace naleznete v tématu Používání knihoven z částečně důvěryhodného kódu.