Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Captures the snapshot of the current T:Microsoft.Office.DocumentManagement.DocumentSets.DocumentSet object with the specified settings and stores the result in the collection.
Namespace: Microsoft.Office.DocumentManagement.DocumentSets
Assembly: Microsoft.Office.DocumentManagement (in Microsoft.Office.DocumentManagement.dll)
Syntax
'Declaration
Public Sub Add ( _
isLastMajor As Boolean, _
comments As String _
)
'Usage
Dim instance As DocumentSetVersionCollection
Dim isLastMajor As Boolean
Dim comments As String
instance.Add(isLastMajor, comments)
public void Add(
bool isLastMajor,
string comments
)
Parameters
isLastMajor
Type: System.BooleanWhen true captures latest major versions of items in the document set; otherwise, captures latest checked-in version of the items in the document set.
comments
Type: System.StringComments for the snapshot.
Exceptions
Exception | Condition |
---|---|
InvalidOperationException | Cannot work with snapshot because versioning is not enabled on the parent list of %1. |
ArgumentException | Cannot work with snapshot because versioning is not enabled on the parent list of ArgumentException.ParamName=isLastMajor. |
ArgumentException | Cannot take minor version snapshots because minor versioning is not enabled on parent list of ArgumentException.ParamName=isLastMajor. |
Remarks
List items that do not have a checked-in major version are not captured if the isLastMajor parameter is true. List items that do not have any checked-in version (minor or major) are not captured.
See Also
Reference
DocumentSetVersionCollection Class