Ask a Question

Advanced Search

Solution ID : SO5723

Last Modified : 05/02/2018

Sign a Macro with a Code Signing Certificate for Microsoft Office and VBA for Microsoft Office 2007

Problem

 
 

Cause

Sign a Macro with a Code Signing Certificate for Microsoft Office and VBA

Solution

To sign a Macro with a Code Signing Certificate for Microsoft Office and VBA for Microsoft Office 2007, perform the following steps:

  1. Open the file which contains the macro you would like to sign
    • For Word, Excel or PowerPoint, under the Code group > Developer tab > click Visual Basic
      Note:
        If the Developer tab does not exist, click Excel Options, PowerPoint Options or Word Options > Popular > check the to box Show Developer tab in the Ribbon or hit the "Alt + F11" keys on the keyboard to open Visual Basic.
    • For Visio, Outlook, or Publisher, under Tools > Macro > click Visual Basic Editor
  2. In the Visual Basic Editor, select the macro you would like to sign
  3. Under Tools menu, select Digital Signature
  4. Click Choose > select the certificate > click OK twice
    • If the certificate is already selected, click OK
Note:  Symantec recommends to timestamp all code with the Microsoft Office and VBA Signing Digital ID.  As long as the code is not altered, this will ensure the code will continue to run after the certificate's expiration date. 

If you used a password to protect your private key, you will be asked for the password when saving your file.  If the password was lost or forgotten, a replacement certificate must be issued. 
For replacement instructions, refer to our Symantec knowledge base article:

SO1737 - How do I replace a Code Signing Digital ID?