none
Macro security warning prompted when my document is created by my add-ins RRS feed

  • Question

  • Hi,

    I have a office add-ins which will add/update document properties for `document control`, but I found that "Macro security" warning will prompt on the document I created and updated by the add-ins under Office 2013.  And I tried that if my "Macro security" setting changed to "Disable all macros except digitally signed macros", the prompt will not shown when I open the file.

    My add-in is just updating document properties, Word and Excel will prompt this warning but PowerPoint hasn't when "Macro security" under "Disable all macros with notification", so may I have any hints that how office determine the file is need to prompt or not?

    Thanks.


    calendarw

    Wednesday, September 12, 2018 3:13 AM

All replies

  • Hi calendarw,

    >> May I have any hints that how office determine the file is need to prompt or not?

    From my understanding that you want to determine if you can run a macro or not from VSTO.

    Please try "HKCU/Software/Microsoft/Office/[version]/Word/Security" and look at the key VBAWarnings.

    For more information, please review the following link: Determine the macro security

    Hopefully it helps you. Please feel free to ask any questions.

    Looking forward to hearing from you.

    Best Regards,

    Yuki



    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread.



    Thursday, September 13, 2018 8:31 AM
    Moderator
  • Hi Yuki,

    Thanks for your info.  I have checked that my Office version which is 15 (Office 2013) and there's no key named `VBAWarnings` under Security.  Am I needed to create one?  What's expected value?


    calendarw

    Monday, September 17, 2018 2:39 AM
  • Hi calendarw,

    Yes. You'd need to create one key.

    And you can review the following link to get the expected value:

    VBA Macro Notification Settings

    Hopefully it helps you.

    Best Regards,

    Yuki


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread.

    Monday, September 17, 2018 5:49 AM
    Moderator
  • Hi calendarw,

    Thanks for your asking. Did you resolve your issue ? If the post helps you, you can mark it as answer and close the post.

    Thank you for understanding. If you have any question, or update, please feel free to let us know.

    I wish you a happy life!

    Best Regards,

    Yuki

    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread.

    Tuesday, September 18, 2018 5:12 AM
    Moderator
  • Hi Yuki,

    Sorry for that I found that the macro warning still prompt after I set it as "Disable all macros except digitally signed macros".  Besides, I missed to point out that the macro warning has prompt three times when open, so is there any code will trigger the macro warning?

    Finally, i don't know why it prompt in Word only, but unable to reproduce in Excel today.

    Thanks.


    calendarw

    Wednesday, September 19, 2018 9:53 AM
  • Hi,

    I don't know why it still prompt even the setting is "Disable all macros except digitally signed macros".

    I missed to point out that the security prompt has prompted three times after open the document, so does it mean there are three different trigger point which cause the word prompt?

    How can I troubleshoot this?


    calendarw

    Thursday, September 20, 2018 12:38 AM
  • Hi calendarw,

    >> I found that the macro warning still prompt after I set it as "Disable all macros except digitally signed macros".

    I've assumed that you didn't clear trusted documents to reset enable macros prompt.

    >> How can I troubleshoot this?

    So please review the following link:

    Excel 2016: How to clear Trusted Documents (reset Enable Macros prompt)

    Hopefully it helps you. Please feel free to ask any questions.

    Best Regards,

    Yuki


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread.

    Thursday, September 20, 2018 8:51 AM
    Moderator
  • Hi calendarw,

    Thanks for your asking. Did you resolve your issue ? If the post helps you, you can mark it as answer and close the post.

    Thank you for understanding. If you have any question, or update, please feel free to let us know.

    I wish you a happy life!

    Best Regards,

    Yuki


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread.

    Friday, September 21, 2018 8:43 AM
    Moderator