\\Get the document Lib
SPDocumentLibrary Lib = (SPDocumentLibrary)web.Lists["Share Documents"];
foreach (SPFile file in Lib.Files)
{
if (file.CheckOutType == SPFile.SPCheckOutType.None)
{
//Check out all the files
file.CheckOut();
}
}
// Now Check in the documents with a comment.
foreach (SPFile file in Lib.RootFolder.Files)
{
if (file.CheckOutType != SPFile.SPCheckOutType.None)
{
file.CheckIn("Checked In using Object Model");
}
}}}
Ads by Google
No comments:
Post a Comment