none
WORD 365: Macros diabled after change in VBA code RRS feed

  • Question

  • I have a problem with at least one Word document. I'm unsure whether the problem relates to the word document or the Office installation. The file in question is a word document with macros, Also this document creates a custom UI menu in the Word ribbon. I have signed the document with a self generated certificate (selfcert.exe), and my macro security settings are: "Disable all macros, except digitally signed macros".

    The file opens fine, and works as intended. I can copy the file and it still works, but if I change anything in the VBA code, I get a warning saying:

    Security Alert - Macros

    Macros

    Macros have been disabled. Macros might containg viruses or other security hazards. Do not enable this content unless you trust the source of this file.

    Warning: The digital signature has been tampered with after the content was signed. This content cannot be trusted.

    There are no options to enable macros, but I can press "Show signature details". If I press this, I can see the certificate, with a message that the certificate/digital signature is ok.

    After that, the macros are disabled and doesn't work, regardless of whether I sign the document again. The only way I can get the macro's working is if I choose "enable all macros" in macro security in the trust center.

    This is not a solution for me due to security concerns, but this has never been a problem before, and the same procedure works great for all my excel files.

    Does anybody have any suggestions to what might be the underlying problem and how to fix it, so I can use the original security settings?

    Tuesday, May 14, 2019 12:25 PM

All replies

  • Hi,

    Based on your description, I will move this thread to Word for Developer forum:

    https://social.msdn.microsoft.com/Forums/en-US/home?forum=worddev

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.

    Regards,

    Emi Zhang


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.

    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Office 2019.

    Wednesday, May 15, 2019 2:44 AM