I want to monitor my references.
But no matter what I use:
For Each objReference In VBE.ActiveVBProject.References
For Each objReference In ActiveDocument.VBProject.References
Set mytemplate = ActiveDocument.AttachedTemplate
For Each objReference In mytemplate.VBProject.References
I get the error 6068
Programmatic access to Office VBA project is denied, becuse the user has not set the "Trust access to the VBA project object model" check box.
But I cannot ask users to make changes in the Trust Center.
So my question is, can you give permission via VBA?