Thursday, April 17, 2008
Creating Digital Signature for VBA Project (Outlook VBA / Excel VBA/ Word VBA)
How to digitally sign a VBA Project
To create a code-signing certificate, follow these steps:
From Programs menu, choose Microsoft Office -> Microsoft Office Tools -> Digital Certificate for VBA Projects
(or)
Navigate to the folder where your Office applications are installed, usually C:\Program
Files\Microsoft Office\Office12 for Office 2007 and run the Selfcert.exe program.
<>
SelfCert.exe is provided with Office 2000 and later. If it is not installed on your system, run Office Setup and install Office Tools Digital Signature for VBA Projects.
Type a name for your certificate - just use your own name or product name and click OK to create your personal code-signing certificate.
<>
Now open the VBA project using Alt+F11 and select Tools ➪ Digital Signature
to open the dialog shown below. In this dialog, click the Choose button and select the
certificate and click OK twice to choose your certificate and
sign your code project with that certificate.
Save your VBA project; then exit and restart Application (Excel / Word / Outlook).
When you open your VBA project next time, you will be prompted to enable your macros in
the dialog shown below
You can use this dialog to trust your certificate by selecting the option to "Always trust macros from this publisher", which prevents this dialog from appearing again, or you can just enable the macros for that session.
Click the Trust All Documents from This Publisher button to trust your code-signing certificate
and add it to the trusted publishers list. If you open the Trust Center dialog shown
again and click the Trusted Publishers area, you will now see your code-signing certificate listed
as a trusted publisher.
The same certificate can be used for multiple projects.
Download Windows Live Toolbar and personalize your Web experience! Add custom buttons to get the information you care about most.
Very helpful. Thank you.
ReplyDeletewhat if you went through the steps listed and created a certificat. then wanted to export that certificate to another computer?
ReplyDeletethe export seems straight forward enough, but i can't seem to find where to import it so that excel will allow you to use it to sign macros on the new computer...
useful piece of information, hope to see some new articles about signing PDF's, thanks.
ReplyDeleteI found the pictures in this article very confusing. Are they randomly located in relation to the text?
ReplyDeleteHow to renew a celf created digital certificate for vba code in multiple locations and users?
ReplyDeleteGreat post. I am glad to see your article here. Your content is really interesting when i read that. You have a good writing inside there. Am stiply.nl in Netherland and Thanks a lot for sharing.
ReplyDelete