Export (0) Print
Expand All

SPFile.Approve Method

Approves the file submitted for content approval with the specified comment.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

public void Approve(
	string comment
)

Parameters

comment
Type: System.String
The comment about the approval.

ExceptionCondition
SPException

The item associated with the SPFile or the SPModerationInformation for the item is null .

Exception

An error occurs when updating the item.

Only documents in a list for which content approval has been enabled can be approved.

Community Additions

ADD
Show:
© 2014 Microsoft