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.
Submits the file for content approval with the specified comment.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Sub Publish ( _
comment As String _
)
'Usage
Dim instance As SPFile
Dim comment As String
instance.Publish(comment)
public void Publish(
string comment
)
Parameters
comment
Type: System.StringA string that contains the comment.
Exceptions
| Exception | Condition |
|---|---|
| SPException | The list item associated with the file is null or the SPList in which the list item locates does not support minor versions. -or- The value of the CheckOutType is Online. -or- An error occurred when publishing the file. |
Remarks
To call this method, the parent SPList of this file should support minor versions.