CanCheckOut 方法

       

值为 True 时,Microsoft PowerPoint 可以将指定的演示文稿从服务器签出。可读写。Boolean 类型。

expression.CanCheckOut(FileName)

expression  必选。该表达式返回“应用于”列表中的对象之一。

FileName  必选。String 类型。演示文稿的服务器路径和名称。

说明

若要利用 PowerPoint 中的协作功能,演示文稿必须保存在 Microsoft SharePoint Portal Server 上。

示例

本示例验证演示文稿是否可以签出且未被其他用户签出。如果演示文稿可以签出,则将演示文稿复制到本地计算机以进行编辑。

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

若要调用上述子程序,请使用下列子程序并用在上面说明部分中提到的服务器上的实际文件替换“http://servername/workspace/report.ppt”文件名。

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