CheckOut 方法

       

从服务器向本地计算机复制指定演示文稿以进行编辑。返回表示签出演示文稿的本地路径和文件名的 String 类型值。

expression.CheckOut(FileName)

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

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

说明

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

示例

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

Sub CheckOutPresentation(strPresentation As String)
    Dim strFileName As String
    With Presentations
    If .CanCheckOut(strPresentation) = True Then
        .CheckOut FileName:=strPresentation
        .Open FileName:=strFileName
    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