VBASigned Property Example

This example loads a presentation called MyPres.ppt and tests to see whether or not it has a digital signature. If there's no digital signature, the code displays a warning message.

Presentations.Open FileName:="c:\My Documents\MyPres.ppt", _
    ReadOnly:=False, WithWindow:=msoTrue
With ActivePresentation
    If .VBASigned = False 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