How to Create a Self-Signed Digital Certificate in Microsoft Office 2010

Microsoft Office 2010 Digital SignaturesIf 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 .

If you are having trouble getting this to work in Outlook, try the solution presented by Carl in the comments

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.”

Create a Self-Signed Digital Certificate in Office 2010

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:

Step One

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.

Create a Self-Signed Digital Certificate in Office 2010

Step Two

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.

Create a Self-Signed Digital Certificate in Office 2010

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.

Step Three

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.

Create a Self-Signed Digital Certificate in Office 2010

Step Four

Open a VBA project and click Tools and choose Digital Signatures.

Create a Self-Signed Digital Certificate in Office 2010`

Step Five

In the Digital Signature window, Click Choose…

Create a Self-Signed Digital Certificate in Office 2010

Step Six

Select the self-signed digital certificate you just created and click OK.

Create a Self-Signed Digital Certificate in Office 2010

Step Seven

Save your VBA project.

Create a Self-Signed Digital Certificate in Office 2010

Step Eight

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.

Create a Self-Signed Digital Certificate in Office 2010

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.

Create a Self-Signed Digital Certificate in Office 2010

Click the Publishers button under Certificates.

Create a Self-Signed Digital Certificate in Office 2010

Here, you can remove certificates by selecting them and choosing remove.



  1. Ed

    Excellent, many thanks!

    • MrGroove

      @Ed – Your very welcome! Thanks for the feedback and I hope to see you around my blog more often!

      • Kashif

        I loved the graphical part of this Howto’s…

  2. Steve

    I’ve written a macro for Outlook 2010 running on my Microsoft Home Server v.1

    Following the above directions for creation of a self-signed certificate, everything goes fine until I try to assign the certificate to the project in the VBA editor. My certificate doesn’t appear in the Digital Signature window, when I click on Choose, no certificates are there to choose from. I’ve confirmed in internet options that the certificate exists.

    Any ideas?


  3. Lindsay

    Fantastic step-by-step instructions and perfect screenshots. I’ve looked at several sets of instructions but this one finally makes it so easy to understand. Thank you very much.

  4. Carl

    Maybe this works for Excel and Word, but this absolutely does NOT work for Outlook, which is VERY finicky about certs. For Outlook:
    1. Make sure Macro settings (in OUTLOOK TRUST CENTER…Email security) are set to notify, and CLOSE Outlook.
    2. Create cert as described above.
    4. Turn right around and IMPORT the cert you just exported. Sounds stupid, I know. But it gets it to the “Intermediate Certification Authorities” list. Putting it there manually using CERTMGR.MSC or otherwise caused me issues. Had to import.
    5. Go into OUTLOOK and IMPORT the CERT yet AGAIN, using Outlook trust center…email security. Exit Outlook.
    6. Start Outlook and NOW assign the macro to your VBA project. Save and exit. Go back into Outlook again. Run the macro, answer yes to the trust message.
    7. If it does not work repeat step 6..sometimes the assignment goes away. If still no luck try the whole process again…you’ll get it working.
    8. If you totally flubbed it up and macro won’t run at all, create a new cert, assign it to macro, then take it off the macro before running it. Exit Outlook and re-start.
    9. Good luck. Outlook has MAJOR issues, and not just with CERTS.

    • Rock n Roach

      Thank you Carl. Steps 3 and 4 got me up and running.

    • George

      You rock!
      Needed all these steps for office 2016.
      Amazing how Microsoft still has not fixed that…

    • Matt Goddard

      Hi Carl and of course Jack for the original post. I did manage to get this working early last year but recently needed to reformat the pc. I have got the macro working with no problem at all, but i cannot seem to get the nag disappear when starting outlook, the option i need to click is still greyed out. Is there anything i am missing? Could a recent windows update have messed things up? Many thanks. Matt

  5. James Hahn

    I have a client who I write macros for. How do I copy my certificate to his machine so that my macros will run without interference on his machine as well?

  6. Ron Bevan

    Dear Jack,

    Thank you so much for this excellent tutorial. I’ve previously had only one foray into the world of VB, and it was unsuccessful. This time, by contrast, was an absolute breeze and it worked right first time. Excellent. It’s also my first experience of GroovyPost, which I found when searching for a solution to my “auto bcc in Outlook 2010” problem, but it certainly won’t be my last.

    Thanks again.

  7. Matt

    Hi Jack,

    Thanks. Superb. Really helpful – I’ve used this to auto BCC myself every time, along with your other post.

    I nearly ran aground, though, when the certificate wasn’t applied when I restarted Outlook. However, I worked out that it was because I had three windows open – mail, calendar and tasks. The way to solve it was to shut down two of those windows, apply the changes and save. I had to do it three times so each time a different one was left open – mail, then calendar, then tasks – and eventually it worked. It may have just worked first time if I closed the others and had only one open but I’ll never know.

    Anyway, thanks again.

  8. Rachel

    This was great! Thank you very much!

    The only slight modification I needed to make was to get this to work was to go to my macro within Outlook and then click view certificate properties when choosing the macro then select Install certificate and save to Trusted Publishers before proceeding with Carl’s step 6 above.

    • Thomas Low

      Is there a tool I can use to sign all my documents so that I don’t have to do it one-by-one?

      I have a set of documents with macros in them and I want to be able to just run a tool to add this Self-signed certificate to those documents. There are just too many to do this by hand.

      • Sotwotimes

        Hello Thomas,

        I have the same problem , I would like to sign mor than one hundred documents. Did you find a tool or a script to do that ?

        I will appreciate if you can help me :-)

        Thank you


        • Thomas Low

          No Tools was found.

  9. Joe B

    Very helpful. Thank you.

  10. Sotwotimes

    Sorry for my bad english but I’m french.
    I need help about digital signatures.

    I would like to sign many excel with my certificat. I have more than one hundred files and I don’t want to do that manually. Someone know if I can do that automatically ?

    Thank you for your help,


  11. Soolee

    Thanks it helped lots!!! much better and greater than SUXX microsoft technical service center!!!!
    They usually says after heard of my request; “SORRY sir, my department is not for that so you need to call another department”.

  12. Erhan

    Hi, this was really very simple and time efficient. Thanks a lot.

  13. Binh


    I face a similar situation but with document content signature, not with VBA, can you help ? it is as follows:

    I received a word document signed by a self-signed certificates, and I have trusted that certificate so that it become valid in word.

    Later on how can i untrust that certificate ?

    Many Thanks

  14. evan effa

    Excellent Resource.

    Thank you.

    BTW: Office 2016 hides the Digital Certificate app in a new location:

    C:\Program Files\Microsoft Office\root\Office16\SELFCERT.EXE

    It works well though.

    Thank you very much.


    • Steve Krause

      Awesome @Evan – Thanks for the feedback AND for the data on Office 2016. I’ll get the article updated.

Leave a Reply

Your email address will not be published. Required fields are marked *


To Top