T
tartancli
Hi,
I have a problem which i hope somebody can help me with. In my Word 2003 COM
Addin, I want to determine if any open documents have associated code. I do
this as follows,
int vbComps = doc.VBProject.VBComponents.Count;
However, if the user has not selected "Trust Access to Visual Basic Project"
macro security setting then any attempt to access VBProject object members
results in an Exception "Programmatic access to Visual Basic Project is not
trusted".
I understand that this security setting is intended to stop virus inserting
code into macros. However, I only want to know if there is code or not. Is
there any way to determine this with this secruty setting?
Thanks in advance
I have a problem which i hope somebody can help me with. In my Word 2003 COM
Addin, I want to determine if any open documents have associated code. I do
this as follows,
int vbComps = doc.VBProject.VBComponents.Count;
However, if the user has not selected "Trust Access to Visual Basic Project"
macro security setting then any attempt to access VBProject object members
results in an Exception "Programmatic access to Visual Basic Project is not
trusted".
I understand that this security setting is intended to stop virus inserting
code into macros. However, I only want to know if there is code or not. Is
there any way to determine this with this secruty setting?
Thanks in advance