Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / April 2005

Tip: Looking for answers? Try searching our database.

Programmatically add reference to RegExp

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
TT - 25 Apr 2005 02:08 GMT
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 - 25 Apr 2005 04:32 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.