Compartilhar via


Lists.CheckInFile Method

Allows documents to be checked in to a SharePoint document library remotely.

Namespace:  [Lists Web service]
Web service reference: http://Site/_vti_bin/Lists.asmx

Syntax

'Declaration
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sharepoint/soap/CheckInFile", RequestNamespace := "https://schemas.microsoft.com/sharepoint/soap/",  _
    ResponseNamespace := "https://schemas.microsoft.com/sharepoint/soap/",  _
    Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
Public Function CheckInFile ( _
    pageUrl As String, _
    comment As String, _
    CheckinType As String _
) As Boolean
'Usage
Dim instance As Lists
Dim pageUrl As String
Dim comment As String
Dim CheckinType As String
Dim returnValue As Boolean

returnValue = instance.CheckInFile(pageUrl, _
    comment, CheckinType)
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/sharepoint/soap/CheckInFile", RequestNamespace = "https://schemas.microsoft.com/sharepoint/soap/", 
    ResponseNamespace = "https://schemas.microsoft.com/sharepoint/soap/", 
    Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
public bool CheckInFile(
    string pageUrl,
    string comment,
    string CheckinType
)

Parameters

  • pageUrl
    Type: System.String

    A string that contains the full path to the document to check in.

  • comment
    Type: System.String

    A string containing optional check-in comments.

Return Value

Type: System.Boolean
true if the operation succeeded; otherwise, false.

Examples

The following example checks in a file to Shared Documents on a subsite.

Dim listService As New Web_Reference_Folder.Lists()

listService.Credentials = System.Net.CredentialCache.DefaultCredentials

Dim fileCheckin As String = "http://Server_Name/sites/Subsite/Shared Documents/MyFile.txt"

Dim myResults As Boolean = listService.CheckIn(fileCheckin, "Completed revision.", "1")
Web_Reference_Folder.Lists listService = new Web_Reference_Folder.Lists();

listService.Credentials = System.Net.CredentialCache.DefaultCredentials;

string fileCheckin = "http://Server_Name/sites/Subsite/Shared Documents/MyFile.txt";

bool myResults = listService.CheckIn(fileCheckin, "Completed revision.", "1");

See Also

Reference

Lists Class

Lists Members

Lists Web Service