CanCheckOut Method

Microsoft PowerPoint Visual Basic

CanCheckOut Method

       

True if Microsoft PowerPoint can check out a specified presentation from a server. Read/write Boolean.

expression.CanCheckOut(FileName)

expression   Required. An expression that returns one of the objects in the Applies To list.

FileName  Required String. The server path and name of the presentation .

Remarks

To take advantage of the collaboration features built into PowerPoint, presentations must be stored on a Microsoft SharePoint Portal Server.

Example

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

Sub CheckOutPresentation(strPresentation As String)
    If Presentations.CanCheckOut(strPresentation) = True Then
        Presentations.CheckOut FileName:=strPresentation
    Else
        MsgBox "You are unable to check out this " & _
        "presentation at this time."
    End If
End Sub

To call the subroutine above, use the following subroutine and replace the "http://servername/workspace/report.ppt" file name with an actual file located on a server mentioned in the Remarks section above.

Sub CheckPPTOut()
    Call CheckOutPresentation(strPresentation:= _
        "http://servername/workspace/report.doc")
End Sub