How to completely disable macros in the Excel 2013

2019-07-27 22:06发布

I have an application that uses Excel 2013. I need a way to disable all macros. I can not do it on workbook open because I do not have access to the open methods, the workbook is opened by another COM application then passed to me. It needs to happen prior to opening the document. What I am ultimately trying to do is set the setting found in the image below.

enter image description here

1条回答
你好瞎i
2楼-- · 2019-07-27 22:34

The best solution I found was to edit the registry. Shout out to Tim Williams for pointing me in the right direction

The key that needs to be edited is HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Excel\Security\VBAWarnings

In my case I was to disable all macros by setting the value to 4

More info can be found Here

查看更多
登录 后发表回答