Security macro settings - how to change it with PowerShell?

Hello,

could you please help me to figure out how can I change settings in Excel using only PowerShell?

I would like to change on my local machines:

  • Language
  • Security Macro

I believe it is maybe possible by editing specific file or register key in system


|

Hi Shuguy,

Unfortunately, I haven't found any PowerShell solution to change Macro Security setting in Excel. As a workaround, you may try using the registry key below:

Open Registry Editor, navigate to the path Computer\HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Excel\Security, find VBAwarnings and double click it, change the Value data to set different Macro Settings:

Value 1: Enable all macros (not recommended; potentially dangerous code can run)

Value 2: Disable all macros with notification

Value 3: Disable all macros except digitally signed macros

Value 4: Disable all macros without notification

WARNING: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Edit at your own risk.

For changing Excel language, per researching, I haven't found any method by using PowerShell or register key method. Welcome community members who have the same experience share insights here.

For the method in Excel UI to change the language, you can refer to this article.

Best Regards,

Tina

[Updated by Tina Chen MSFT, February 15, 4:16 PM UTC]

--------------------------------
* Beware of scammers posting fake support numbers here.
* Kindly Mark and Vote this reply if it helps, as it will be beneficial to more community members reading here.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Thank you very much for info about macro security, it will help a lot! :)

It would be amazing to know how to change language for whole office in PowerShell.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Hi Shuguy,

Unfortunately, per researching, I cannot find any PowerShell solution to change Office language. Your understanding is appreciated.

Community member who have PowerShell solutions are welcome to share ideas here.

Usually, we can change Office language by the UI method as mentioned above or Office deployment tool(ODT). For ODT solution, you can refer to this article: Overview of deploying languages in Office 365 ProPlus

Best Regards.

Tina

--------------------------------
* Beware of scammers posting fake support numbers here.
* Kindly Mark and Vote this reply if it helps, as it will be beneficial to more community members reading here.

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated May 17, 2019 Views 1,912 Applies to: