bottom
Great WordTips!
         
Your e-mail address is safe!
Close Note

Tips.Net > WordTips Home > Macros > Checking for a Security Certificate

Checking for a Security Certificate

Summary: You can digitally sign your VBA projects to help ensure authenticity of your code and increase security. If you use such signatures, it is a good idea if your macros check to ensure that the signature is present. This tip explains how to do the check in VBA. (This tip works with Microsoft Word 2000, Word 2002, and Word 2003.)

Starting with Word 2000, you could "digitally sign" your documents and templates with a security certificate. Technically, it is the VBA projects attached to documents and templates that can be signed. In your macros you may want to verify that the certificate is in place. Checking for the signature programmatically can make it easier to manage the overall security efforts of a company.

The property you can use for this purpose is VBASigned. You can use it as follows:

Documents.Open FileName:="D:\dotfiles\temp.dot"
If Not ActiveDocument.VBASigned Then
    MsgBox "Warning! This document has not been digitally signed.", _
      vbCritical, "Digital Signature Warning"
End If

The VBASigned property will be either True or False, depending on whether the document (in this case a template) has been signed.

Tip #1461 applies to Microsoft Word versions: 2000 | 2002 | 2003


Ultimate Library! The most amazing collection ever offered in the history of WordTips places every tip—present and historical—at your fingertips. Check out the WordTips Ten-Year Library.

Helpful Links

Ask a Word Question
Make a Comment

Tips.Net Home
Vital News Home

WordTips FAQ
WordTips Premium

Learn Access Now

Beauty Tips
Car Tips
Cleaning Tips
College Tips
Cooking Tips
Excel2007 Tips
ExcelTips
Family Tips
Gardening Tips
Health Tips
Home Tips
Money Tips
Pet Tips
Word2007 Tips
WordTips

Advertise on the
WordTips Site

 

Great Info!

Get tips like this every week in WordTips, a free productivity newsletter. Enter your e-mail address and click "Subscribe."
     
(Your e-mail address will never be shared with anyone, ever.)