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:
- Open the file that contains your macro project
- 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.
- In your Visual Basic Project Explorer, select your project to sign
- Select Tools menu and click Digital Signature
- Click Choose and select the certificate and then click OK twice
- 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.