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 / February 2005

Tip: Looking for answers? Try searching our database.

Controlling project references in code

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bo Hansson - 04 Feb 2005 08:04 GMT
I need an example that explains how to add and remove project references in
VBA code.

/BosseH
Jonathan West - 04 Feb 2005 10:42 GMT
>I need an example that explains how to add and remove project references in
> VBA code.
>
> /BosseH

Hi Bo,

You can add a reference to a probject using the
VBProject.References.AddFromGuid method. You need the GUID of the ActiveX
control in order to add it to the list.

You can also use the Remove method of the references collection to remove a
reference. Code samples are available in the VBA Help file.

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup

Bo Hansson - 04 Feb 2005 13:09 GMT
Thanks Jonathan,

However, I must say that I cannot find any good samples in the VBA Help
file.
And furthermore, my prime mission will probably be to recognise any missing
references, and then try to supply the targets of these or completely remove
them.
A couple of years ago I saw some tricky samples of how to do this, but now I
cannot remember where, and - one might hope that methods available today are
better and easier to use.

/BosseH

> >I need an example that explains how to add and remove project references in
> > VBA code.
[quoted text clipped - 9 lines]
> You can also use the Remove method of the references collection to remove a
> reference. Code samples are available in the VBA Help file.
Tom Winter - 04 Feb 2005 22:01 GMT
Look at my post in microsoft.public.word.vba.addins under "problem with
reference being replicated"

Signature

Tom Winter
tom@nospam.amosfivesix.com

> Thanks Jonathan,
>
[quoted text clipped - 28 lines]
> a
>> reference. Code samples are available in the VBA Help file.
 
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.