PowerPoint) (Presentations.CheckOut 方法

會將指定的簡報從伺服器複製到本機電腦上供編輯。 會傳回 String ,代表簡報取出的本機路徑和檔案名稱。

語法

運算式。CheckOut (FileName)

運算式 代表 Presentations 物件的變數。

參數

名稱 必要/選用 資料類型 描述
FileName 必要 String 伺服器路徑和簡報名稱。

傳回值

無

註解

若要利用 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

另請參閱

Presentations 物件

支援和意見反應

有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。