vbscript - VBA or VBA for enabling macros ms word -


i need .vbs script enable macros on ms word.

so every time .vbs run, macros should enabled

kindly help..

the default registry key macro security

[hkey_current_user\software\microsoft\office\14.0\word\security] "vbawarnings"=dword:00000001 

you set script:

set wso = createobject("wscript.shell") wso.regwrite "hkcu\software\microsoft\office\14.0\word\security\vbawarnings", 1, "reg_dword" 

and enable macros. works if word either closed when run script or restarted afterwards.

if in company uses gpos handle macro security overwritten.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -