Sign Code with Microsoft Visual Basic for Applications

A Code Signing Certificate can be used to digitally sign code or content developed by Microsoft Office applications such as Word, Excel, PowerPoint, and Visio. After you received the trusted certificate and saved the PFX (.p12) file, follow the instructions below to guide you through digitally signing a macro project:

  1. Open the file that contains your macro project
  2. Under the Developer tab, in the Code section, click Visual Basic

Note: To add the Developer tab, click Microsoft Office Button, and then select Excel Options. Continue by clicking Popular and then the Show Developer tab in the Ribbon check box.

  1. In your Visual Basic Project Explorer, select your project to sign
  2. Select Tools menu and click Digital Signature
  3. Click Choose and select the certificate and then click OK twice
  4. Your macro project has been successfully signed

After installing the certificate, we highly recommend timestamping your code to ensure users can still verify your signature even after the certificate has expired. Click here to learn more about timestamping.
Note: The above instructions apply to Excel, Word, Outlook, PowerPoint, Publisher, Visio, Visio Standard, Project, and Project Standard.