共用方式為


簡報。CheckOut 方法 (PowerPoint)

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

語法

表情查看 (檔名)

一個代表 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 支援與意見反應