How can I disable macros in Excel in the package level?

vmalapati
New Contributor

Can someone please help me to disable macros through the package level. The checkbox should be grayed out. Users cannot change the settings from prefereances. It has to disable. please help me how I can do this from the package level ? Or if you can provide any script to disable macro that helps me as well.

2 REPLIES 2

ralphaelhollins
New Contributor III

After 3 years we are in the same boat. I would like to see the code to disable or grey it out.

luke_apnic
New Contributor
defaults write com.microsoft.office VisualBasicMacroExecutionState -string DisabledWithoutWarnings