PowerPoint) (Presentations.CheckOut 方法

将指定演示文稿从一台服务器复制到本地计算机以进行编辑。 返回表示签出演示文稿的本地路径和文件名称的 字符串 。

语法

表达式。签出 (FileName)

表达式 表示 Presentations 对象的变量。

参数

名称 必需/可选 数据类型 说明
FileName 必需 String 演示文稿的服务器路径和名称。

返回值

Nothing

注解

要利用 Microsoft PowerPoint 中内置的协作功能,演示文稿必须存储在 Microsoft Office 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 With
End Sub

要调用上述子例程,请使用以下子例程并将 “https://servername/workspace/report.ppt" 位于上文“备注”部分中提到的服务器上的实际文件的文件名。

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

另请参阅

演示文稿对象

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。