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

另请参阅

演示文稿对象

支持和反馈

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