Sign VBA Code - Microsoft Office 2007

May 21, 2024

Sign VBA Code - Microsoft Office 2007

Signing Visual Basic for Applications (VBA) Code in Microsoft Office 2007

Article Purpose: This article provides step-by-step instructions for using your code signing certificate to sign VBA code in Microsoft Office 2007. If this is not the solution you are looking for, please search for your solution in the search bar above.

  1. From your document, right-click the ribbon bar and select Customize Quick Access Toolbar.

  2. In Word Options select Popular. Select the Show Developer Tab in the Ribbon option.

  3. From your document select the Developer tab. Click the Visual Basic button.

  4. At this point the Visual Basic Editor will open with the project name of the file you are working on. Right-click on Microsoft Word Objects in the left-hand pane and select Insert. Click Module.

  5. You may now enter your visual basic code in the main panel.
  6. From here you can sign your code with your Code Signing certificate by choosing Tools and then Digital Signature from the top menu.

  7. Another window will open and you will see the current signature associated with this module. Office will allow you to choose a certificate to either sign the module or change the certificate which has currently signed the module.

  8. If you chose to select a different certificate you will be presented a screen to select the certificate you wish to sign your code. Select your certificate. Click OK.

  9. The module will be signed with the chosen certificate.

  10. Save your file from inside the Visual Basic Editor.

  11. In order to test that the VBA in the document has been properly signed, close the document from your office application and then reopen it. If Macros are set to "Disabled with Prompt" you will receive the Security Warning bar. Click Options to continue.


    If macros are set to "Disabled Without Prompt", the user will not have the option to run the macros whether they are signed or not. This is a local setting that cannot be overridden and must be change by the end user.
  12. To always trust Macros from this publisher select Trust Documents From This Publisher.

  13. Once accepted, the Macros will run transparently.

Related Articles

GlobalSign System Alerts

View recent system alerts.

View Alerts

Atlas Discovery

Scan your endpoints to locate all of your Certificates.

Sign Up

SSL Configuration Test

Check your certificate installation for SSL issues and vulnerabilities.

Contact Support