Projects.CanCheckOut Method

Project Developer Reference

True if Microsoft Office Project 2007 can check out the specified project from Windows SharePoint Services.

Syntax

expression.CanCheckOut(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 example copies the project to the local computer for editing.

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

End Sub

See Also