VBASigned 属性

       

决定指定文档的 VBA (Visual Basic for Applications) 项目是否已进行数字签名。只读。MsoTriState 类型。

示例

本示例加载一篇名为“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