Code Signing Microsoft Office Macros and Visual Basic for Applications
A code signing certificate can be used to sign content produced by several Microsoft® Office applications such as Word®, Excel® and PowerPoint®.
Before you get started, make sure the code signing certificate and private key are in the Windows certificate store. Refer to Installing Code Signing Certificate in Windows for installation instructions.
To Code Sign Documents
- Open the file you want to sign.
- Click the Tools menu, highlight Macro and click Visual Basic Editor.
- In the Project Explorer window, select the VBA macro project that you want to sign.
- From the Tools menu, select Digital Signature.
- Click Choose and select your Code Signing Certificate.
- Click OK to close.
By default, Windows® XP and Windows 7 do not add a time stamp to the certificate.
If you would like to allow people to continue using your signed Visual Basic® for Applicaions (VBA) code after the certificate expires, modify the registry on your code-signing computer to add a time stamp at the time of signing using the following keys:
- Create Key: HKEY_CURRENT_USER\Software\Microsoft\VBA\Security
- Create String: HKEY_CURRENT_USER\Software\Microsoft\VBA\Security\TimeStampURL
- Create DWORD: HKEY_CURRENT_USER\Software\Microsoft\VBA\Security\TimeStampRetryCount
- Create DWORD: HKEY_CURRENT_USER\Software\Microsoft\VBA\Security\TimeStampRetryDelay
- Set the new fields to these values:
TimeStampURL = http://tsa.starfieldtech.com
TimeStampRetryCount = 3
TimeStampRetryDelay = 2
Sign Java Code
Converting an Exported PFX Code Signing File to PVK and SPC Files Using Windows
Exporting an Installed Code Signing Certificate from Firefox
What is your time stamping server URL?
What issuing organization is right for my code signing certificate?
Import a Code Signing Certificate into Firefox
Your message was successfully sent.
There was an error in sending your message, please try again.
Have a question about the content of this article?