开发者

How to Programmatically Enable Trust for VBA Project?

开发者 https://www.devze.com 2023-01-02 10:18 出处:网络
Getting the following error when trying to open a word document with macros to fill in the form fields:

Getting the following error when trying to open a word document with macros to fill in the form fields: HKEY_LOCAL_MACHINE\Software\Microsoft\Office\11.0\Word\Security\AccessVBOM

The user opening the word document does not have admin rights and the AccessVBOM flag is开发者_Go百科 either not available or set to zero. I can set the flag for the HKCU programmatically but cannot change setting for AccessVBOM under HKLM.

Please advise how can we enable the trust for the VBA project programmatically.


I don't think you can, unless you change the setting in the registry. Without admin rights, not likely.

If you're on a corporate network that uses AD, you could use a GPO to set this - Office 2003, Office 2007, Office 2010.

0

精彩评论

暂无评论...
验证码 换一张
取 消