How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask bbao Your Own Question

bbao
bbao, IT Consultant
Category: Microsoft Office
Satisfied Customers: 189
Experience:  Certified Information Systems Security Professional / Certified Information Security Manager / Microsoft Most Valuable Professional
96068672
Type Your Microsoft Office Question Here...
bbao is online now
A new question is answered every 9 seconds

I have a relatively unsophisticated knowledge of using VBA

Customer Question

I have a relatively unsophisticated knowledge of using VBA macros in Outlook 2016. I copied a macro off the internet and followed various instructions for adding the macro to Outlook, adding a macro button to the ribbon, digitally signing the macro with SelfCert.exe, and I thought I was good to go. But I'm stumped at the last step: I cannot figure out how to get the digital signature to be added to the Trust Center as a Trusted Publisher.
Various websites have said that when I run the macro, it should pop up a box asking if I trust the publisher, but it doesn't do that. If I run the macro from the ribbon button, nothing happens. If I run the macro from the VBA window, I get a message that says "The macros in this project are disabled. Please refer to the online help or documentation of the host application to determine how to enable macros."
I thought maybe there's a different problem, but I'm pretty sure this is the problem because if I go to the Trust Center in Outlook 2016 and lower the security level to the lowest there is, the macro runs perfectly.
How do I fix this?
Submitted: 29 days ago.
Category: Microsoft Office
Expert:  bbao replied 29 days ago.

Did you try the method given by Microsoft official KB?

https://support.office.com/en-us/article/Add-remove-or-view-a-trusted-publisher-87b3d5a3-b68c-4023-87c4-7cc78a44d7ed

Customer: replied 29 days ago.

I looked at it, but couldn't figure out what to do. Maybe I'm too uninformed, but:

1) In the "Learn about trusted publishers" section, it says that if you try to run the code, it will be diabled, and the Message Bar will notify me of potentially unsafe code. No Message Bar ever appeared.

2) I don't see anything else on that page that I understood as offering me an option to add the certificate to the Trust Center without a Message Bar.

Expert:  bbao replied 29 days ago.

Do you mean you can't see the message bar in any situation?

Customer: replied 29 days ago.

Not sure what you mean. When I try to run this macro, I never see the message bar. I don't ever recall seeing a message bar in Outlook, but maybe I'm wrong on that. I see a message bar all the time in Excel.

Expert:  bbao replied 29 days ago.

Please check attached the screenshot for the Trust Center setting regarding the message bar, try changing your setting to "notifications for all macros".

Customer: replied 29 days ago.

I made that change, which now generates a message each time the macro is run, but the message grays out the option to "Trust all documents from this publisher" which is what I really need.

Expert:  bbao replied 29 days ago.

If you really need to trust all documents, you should choose "enable all macros" in the previous setting in my screenshot.

Customer: replied 29 days ago.

Sorry, no. The purpose of signing the macro is so that it will be trusted. I absolutely don't want untrusted macros to run, but I should be able to run trusted macros without having to answer a question each time.

Expert:  bbao replied 29 days ago.

Okay, please check if there are items listed under Trust Center > Trusted Publishers?

Customer: replied 28 days ago.

There are other Trusted Publishers, but not my certificate. And no obvious way that I can see to add my certificate.

Expert:  bbao replied 28 days ago.

You cannot add trusted publisher directly under Trust Center > Trusted Publishers. A new trusted publisher is added when you are trying to run its code. As the official KB mentioned below.

If the code that Office has blocked identifies the publisher, and you are certain that you trust the publisher, you can add the publisher to the list of trusted publishers when you view more information about the security warning.

To add a publisher to the list of Trusted Publishers after a security warning

  1. Open the file from the new publisher.

  2. Click File.

  3. In the Security Warning area, click Enable Content > Advanced Options.

  4. In Microsoft Office Security Options, click Trust all documents from this publisher.

Expert:  bbao replied 28 days ago.

Does it make sense now?

Customer: replied 28 days ago.

I hear what you're saying, but it doesn't answer my question. Most of what you've written is simply copied from the website you'd previously referred me to, and to which I had referred even before that. But it doesn't help because the security warning isn't popping up.

In the piece above, item (1), it says "open the file..." In the case of a macro that I wrote myself (or more particularly, that I copied), what is "the file" that one is supposed to open?

Expert:  bbao replied 28 days ago.

I am confused. You did see a Microsoft Outlook Security Notice and you took a screenshot and posted here. Did you click "Enable Macros" button on this message?

Customer: replied 28 days ago.

Sure, I clicked "enable macros." But that's not the answer because:

1) every time I reopen Outlook I have to click that "enable macros" button. I should be able to run the macro without having to go through the process of clicking a button (after all, that's why one would sign a certificate!)

2) I believe that once I enable macros, I've enabled all macros - which is poor security.

I feel like we're getting nowhere. The question is how to get my certificate into the Trust Center and it seems you don't know how to do that. Right?

Expert:  bbao replied 28 days ago.

Okay, if you don't think I can help you further, I will opt out and let other experts step in. Good luck.

Customer: replied 27 days ago.

Yes, I'd like you to opt out. Thanks.