Sign VBA Code - Microsoft Office 2007

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.
    clip_image002.png
  2. In Word Options select Popular. Select the Show Developer Tab in the Ribbon option.clip_image004.png
  3. From your document select the Developer tab. Click the Visual Basic button. clip_image006.png
  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.clip_image007.png
  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.clip_image008.png
  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.
    clip_image010.png
  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.
    clip_image011.png
  9. The module will be signed with the chosen certificate.
    clip_image013.png
  10. Save your file from inside the Visual Basic Editor.clip_image014.png
  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.
    clip_image015.png
    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.clip_image016.png
  13. Once accepted, the Macros will run transparently.

Related Articles

GlobalSign System Alerts

View recent system alerts.

View Alerts

Certificate Inventory Tool

Please click the button below to log in or sign up.

Log In - Sign Up

SSL Configuration Test

Check your certificate installation for SSL issues and vulnerabilities.