共用方式為


PowerPoint) (Presentation.VBASigned 屬性

會決定指定文件的 Visual Basic for Applications (VBA) 專案是否已進行數位簽章。 唯讀。

語法

expressionVBASigned

表達 代表 Presentation 物件的變數。

傳回值

MsoTriState

註解

VBASigned 屬性的值可以是下列其中一個 MsoTriState 常數。

常數 描述
msoFalse 指定之文件的 VBA 專案未進行數位簽章。
msoTrue 指定之文件的 VBA 專案已進行數位簽章。

範例

本範例會載入名為 MyPres.ppt 的簡報,並且測試是否有數位簽章。 如果沒有數位簽章,則程式碼會顯示警告訊息。

Presentations.Open FileName:="c:\My Documents\MyPres.ppt", _
    ReadOnly:=msoFalse, WithWindow:=msoTrue

With ActivePresentation
    If .VBASigned = msoFalse And _
           .VBProject.VBComponents.Count > 0 Then
       MsgBox "Warning! The Visual Basic project for" _
           & vbCrLf & "this presentation has not" _
           & vbCrLf & " been digitally signed." _
           , vbCritical, "Digital Signature Warning"
    End If
End With

另請參閱

Presentation 物件

支援和意見反應

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