决定指定文档的 VBA (Visual Basic for Applications) 项目是否已进行数字签名。只读。MsoTriState 类型。
MsoTriState 可以是下列 MsoTriState 类型常数之一。 |
msoCTrue |
msoFalse |
msoTriStateMixed |
msoTriStateToggle |
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