Share via


CheckIn Method [Visio 2003 SDK Documentation]

Returns a document from a local computer to a Microsoft SharePoint Portal Server computer.

object**.CheckIn** [saveChanges],[commments],[makePublic]

object     Required. An expression that returns a Document object.

saveChanges     Optional Boolean. True (non-zero) to save document changes before check-in; False (0) to check the document in without saving changes. The default is True.

comments     Optional Variant. Any comments to be stored with this revision of the document (applies only if saveChanges equals True).

makePublic     Optional Boolean; True to publish the document after check-in. This submits the document for the approval process or, if there is no approval routing for the document, a public version is created that is available to readers of the folder (applies only if saveChanges equals True); False leaves the document available only for private viewing. The default is False.

Version added

2002 SR-1

Remarks

After the document has been checked in using the CheckIn method, the document is closed. This behavior is different from the user interface; when you check in a document in the user interface, the document is closed and re-opened as read-only.

To use the CheckIn method, files must be stored in enhanced folders on a Microsoft SharePoint Portal Server computer.

Example

This example checks the server to see if the specified document can be checked in. If it can, this example saves and closes the document, and then checks it back into the server.

Sub CheckDocIn(varDocCheckIn As Variant)
 
    If Documents.Item(varDocCheckIn).CanCheckin = True Then 
        Documents.Item(varDocCheckIn).CheckIn 
        MsgBox varDocCheckIn & " has been checked in." 
    Else 
        MsgBox "This file cannot be checked in " _ 
            & "at this time. Please try again later." 
    End If  
 
End Sub  

To call the preceding CheckDocIn subroutine, use the following subroutine and replaceservername/workspace/drawing.vdx with the path to and name of an actual file located in an enhanced folder on a Microsoft SharePoint Portal Server computer.

Sub DocIn() 

    Call CheckDocIn _ 
        (varDocCheckIn:="http://servername/workspace/drawing.vdx")
 
End Sub    

Applies to | Document object

See Also | CanCheckIn method | CanCheckOut method | CheckOut method