如果 Microsoft PowerPoint 可以取出指定的簡報從伺服器會傳回 True 。
語法
expression。
CanCheckOut( _FileName_ )
詞 一個代表 Presentations 物件的變數。
參數
| 名稱 | 必要/選用 | 資料類型 | 描述 |
|---|---|---|---|
| FileName | 必要 | String | 伺服器路徑和簡報名稱。 |
傳回值
布林值
註解
若要利用 PowerPoint 內建的共同作業功能,您必須將簡報儲存在 Microsoft Office 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
要呼叫上述子程式,請使用以下子程式,並將「 」檔案名稱替換 https://servername/workspace/report.ppt 為位於上述備註區中提及的伺服器上的實際檔案。
Sub CheckPPTOut()
Call CheckOutPresentation(strPresentation:= _
"https://servername/workspace/report.doc ")
End Sub
另請參閱
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。