Table of contents
Collapse the table of content
Expand the table of content

DocumentLibraryVersions.IsVersioningEnabled Property (Office)

office 365 dev account|Last Updated: 6/12/2017
1 Contributor

Gets a Boolean value that indicates whether the document library in which the active document is saved on the server is configured to create a backup copy, or version, each time the file is edited on the Web site. Read-only.


expression. IsVersioningEnabled

expression A variable that represents a DocumentLibraryVersions object.


Versioning is enabled or disabled on the document library and not on individual documents. Therefore the value of the IsVersioningEnabled property depends on the document library in which the document is saved.


The following example displays the number of saved versions of the active document, if versioning is enabled.

 Dim dlvVersions As Office.DocumentLibraryVersions 
 Set dlvVersions = ActiveDocument.DocumentLibraryVersions 
 If dlvVersions.IsVersioningEnabled Then 
 MsgBox "This document has " & dlvVersions.Count & _ 
 " saved versions.", vbInformation + vbOKOnly, _ 
 "Version Information" 
 MsgBox "Versioning is not enabled for this document.", _ 
 vbInformation + vbOKOnly, "No Versioning" 
 End If 
 Set dlvVersions = Nothing 

See also


DocumentLibraryVersions Object

Other resources

DocumentLibraryVersions Object Members

© 2018 Microsoft