Projects.CheckOut Method

Project Developer Reference

Performs a checkout of the specified file if it is stored in Windows SharePoint Services.

Syntax

expression.CheckOut(FileName)

expression   A variable that represents a Projects object.

Parameters

Name Required/Optional Data Type Description
FileName Required String The name of the file to check out.

Return Value
Boolean

Example
This example verifies that a project is not checked out by another user and can be checked out. If the project can be checked out, the code copies the project to the local computer for editing.

Visual Basic for Applications
  Sub CheckOutProject(docCheckOut As String)
' Determine whether project can be checked out.
If Projects.CanCheckOut(docCheckOut) = True Then
    Projects.<strong class="bterm">CheckOut</strong> docCheckOut
Else
    MsgBox "Unable to check out this project at this time."
End If

End Sub

See Also