Document.CheckIn method (Visio)
Returns a document from a local computer to a Microsoft SharePoint Server computer.
Syntax
expression.CheckIn (SaveChanges, Comments, MakePublic)
expression A variable that represents a Document object.
Parameters
Name | Required/Optional | Data type | Description |
---|---|---|---|
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. |
Return value
Nothing
Remarks
To check in a file, it must be stored in a document library on a computer running Microsoft SharePoint Server or Microsoft SharePoint Foundation.
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.
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 replace servername/workspace/drawing.vdx with the path to and name of an actual file located on a Microsoft SharePoint Server computer.
Sub DocIn()
Call CheckDocIn _
(varDocCheckIn:="https://servername/workspace/drawing.vdx ")
End Sub
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기