I want to be able to programmatically add a reference to the RegExp engine.
When I look at "Microsoft VBScript Regular Expressions 5.5" in the
References Dialog, the path is shown as
"c:\windows\system32\VBScript.Dll\3".It appears that I should be able to
programmatically set the reference with:
Application.AddIns.Add SomeString
but I can't figure out what should be passed ion SomeString.
Anyone know how to do this?
Thanks,
Tom
Add-ins and references are not the same thing. Add-ins are the files listed
on the Templates and Add-ins dialog. References are the files listed in
VBA's Tools > References. To add a reference you need something like
Application.VBE.ActiveVBProject.References.AddFromFile [Filename]
And in this case, the filename you want is indeed
"c:\windows\system32\VBScript.Dll\3". Try it.
>I want to be able to programmatically add a reference to the RegExp engine.
>When I look at "Microsoft VBScript Regular Expressions 5.5" in the
[quoted text clipped - 9 lines]
> Thanks,
> Tom
TT - 25 Apr 2005 11:39 GMT
Thanks for the info. Unfortunately, it appears that I will never be able to
use this handy feature -- VBA is giving me an error message "Programmatic
accesss to VBA is not trusted". Lowering my security settings in Word to
"minimal" did not fix the problem. Perhaps this is an "improvement" I picked
up when I upgraded to XP Pro SP 2.
> Add-ins and references are not the same thing. Add-ins are the files
> listed on the Templates and Add-ins dialog. References are the files
[quoted text clipped - 19 lines]
>> Thanks,
>> Tom
Howard Kaikow - 25 Apr 2005 14:52 GMT
i believe that you have to check "Trust Access to VB Oroject" on the
"TRusted Sources" tab of the security dialog.

Signature
http://www.standards.com/; See Howard Kaikow's web site.
> Thanks for the info. Unfortunately, it appears that I will never be able to
> use this handy feature -- VBA is giving me an error message "Programmatic
[quoted text clipped - 24 lines]
> >> Thanks,
> >> Tom