Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Programmatically add reference to RegExp

20 views
Skip to first unread message

TT

unread,
Apr 24, 2005, 9:08:53 PM4/24/05
to
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


Jezebel

unread,
Apr 24, 2005, 11:32:33 PM4/24/05
to
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.

"TT" <tomt...@comcast.net> wrote in message
news:4_6dnXvxUJC...@comcast.com...

TT

unread,
Apr 25, 2005, 6:39:31 AM4/25/05
to
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.
"Jezebel" <warc...@whitehouse.gov> wrote in message
news:%231SNsdU...@TK2MSFTNGP12.phx.gbl...

Howard Kaikow

unread,
Apr 25, 2005, 9:52:08 AM4/25/05
to
i believe that you have to check "Trust Access to VB Oroject" on the
"TRusted Sources" tab of the security dialog.

--
http://www.standards.com/; See Howard Kaikow's web site.


"TT" <tomt...@comcast.net> wrote in message

news:UsWdncmEWc5...@comcast.com...

0 new messages