If you’re a hardcore Microsoft Office user, then you’ve already discovered the power and flexibility of custom macros and Visual Basic for Applications (VBA) scripts by now. Even if you’re not a code warrior, you can expand the functionality of Microsoft Outlook, Microsoft Word, Microsoft Excel and other Office 2010 products with copy and paste VBA codes, such as the bit of code we showed you that allows you to Automatically BCC in Outlook 2010.
The problem with custom macros and VBA projects is that Microsoft Office 2010’s security features tends to err on the side of caution, giving you a warning for every single macro you’ve created every time you boot up an Office application. It’ll say something like: "Microsoft Office has identified a potential security concern. Macros have been disabled. Macros might contain viruses or other security hazards. Do not enable this content unless you trust the source of this file.”
It’s a minor annoyance, but it’s a nuisance all the same. In order to get rid of those nagging warnings, you have to get your custom macros digitally signed. Here’s how:
Click Start and open the Microsoft Office 2010 folder. Within this folder, look for the Microsoft Office 2010 Tools folder. Expand it and click Digital Certificate for VBA Projects.
Type a name for your self-signed certificate and click OK. It doesn’t matter what you name it. Afterwards, you’ll see a message saying the digital certificate was created successfully.
Note: Office will give you this long spiel about how self-signed certificates only work on your machine, because self-signed digital signatures could be forgeries, but that doesn’t matter, since you’re making this for your own projects. However, if you do plan on distributing your custom macros, you should look into getting an authenticated code signing certificate. The Create Digital Certificate program gives you a convenient link for commercial certificate authorities, if you’re interested in going that route.
Launch Outlook 2010, or Word 2010 or whatever Microsoft Office 2010 application you have custom macros for. Click the Developer tab and choose Visual Basic.
Open a VBA project and click Tools and choose Digital Signatures.
In the Digital Signature window, Click Choose…
Select the self-signed digital certificate you just created and click OK.
Save your VBA project.
Next time you launch your Office 2010 application, you’ll get a different message that says: “Warning: This publisher has not been authenticated and therefore could not be imitated. Do not trust these credentials.” The reason it’s saying this is because it’s self-signed—you can trust it because you’re the one who made it. Click Trust all documents from this publisher and you’ll be rid of those nagging warnings forever.
And that’s all there is to it. If you ever want to remove a certificate, you can do so by opening up Control Panel > Network and Internet > Internet Options and going to the Content tab.
Click the Publishers button under Certificates.
Here, you can remove certificates by selecting them and choosing remove.