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 / May 2006

Tip: Looking for answers? Try searching our database.

File location

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tony - 07 May 2006 01:10 GMT
How to I determine the name of the file path to the file with the macro
that's running ?  Word 97.

Thanks, for any help,

Tony
Shauna Kelly - 07 May 2006 03:19 GMT
Hi Tony

ThisDocument.Path will return the path to the document (or template or
add-in) that holds the code that's running.

That works in Word 2000 and above. I don't have a copy of Word 97 here to
check, but I think it worked then too.

Hope this helps.

Shauna Kelly.  Microsoft MVP.
http://www.shaunakelly.com/word

> How to I determine the name of the file path to the file with the macro
> that's running ?  Word 97.
>
> Thanks, for any help,
>
> Tony
Jonathan West - 07 May 2006 11:57 GMT
> Hi Tony
>
[quoted text clipped - 3 lines]
> That works in Word 2000 and above. I don't have a copy of Word 97 here to
> check, but I think it worked then too.

Application.MacroContainer.Path also works.

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org 

 
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.