File.Approve method
Approves the file submitted for content approval with the specified comment.
Namespace: Microsoft.SharePoint.Client
Assembly: Microsoft.SharePoint.Client (in Microsoft.SharePoint.Client.dll)
Syntax
'Declaration
Public Sub Approve ( _
comment As String _
)
'Usage
Dim instance As File
Dim comment As String
instance.Approve(comment)
public void Approve(
string comment
)
Parameters
comment
Type: System.StringThe comment about the approval.
Exceptions
Exception | Condition |
---|---|
SPException | The item associated with the SPFile or the SPModerationInformation for the item is null . |
Exception | An error occurs when updating the item. |
Remarks
Only documents in a list for which content approval has been enabled can be approved.