To sign code with a Code Signing Certificate for Microsoft Office and VBA, perform the following steps below:
- Open the document or template that contains the macros you want to sign
- Open Visual Basic Editor
- Select the VBA project you want to sign in the Project Explorer
- Click Tools > Digital Signature > Choose > Choose a Digital ID > OK
- Save your file
Note: DigiCert recommends timestamping 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. To learn more about Timestamp VBA projects, refer to this article.
Important: DigiCert recommends customers must leverage the SHA256 Timestamping service going forward, and should not use a SHA1 service unless there is a legacy platform constraint that doesn’t allow the use of the SHA2 service.
The timestamping URL is: http://timestamp.digicert.com
Note: Microsoft tools VBA, MAGE do not currently support RFC 3161 protocols. DigiCert does offer RFC 3161 Timestamp services that can be used when support becomes available for RFC 3161.