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.
The CheckIn method of the SPFile class checks in the file to a document library.
comment A string that contains a comment regarding the check in.
Although a check-in comment is not required in the user interface, the CheckIn method requires a comment as its parameter.
If versioning is enabled for the document library that contains the file, calling the CheckIn method creates an SPFileVersion object.
The following code example checks files back into the Shared Documents document library of a subsite if the specified user is the one who checked them out.
This example requires using directives (Imports in Visual Basic) for both the Microsoft.SharePoint and Microsoft.SharePoint.WebControls namespaces.
Platforms: Microsoft Windows Server 2003
Security: Code Access Security