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 / November 2007

Tip: Looking for answers? Try searching our database.

Auto - FilePath?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Benz - 14 Nov 2007 14:27 GMT
Hi,

I have a macro which allows the user to you insert the project name into the
doc properties.  Im trying to use that name/text in a different macro to a
file.  So it would look like this.

c = ActiveDocument.CustomDocumentProperties("Project").Value

G:\Project\ "C's Value Here" \Contacts\Word.doc

Any help would be appreciated.

Ben Z.
Lene Fredborg - 14 Nov 2007 23:02 GMT
I am not sure whether I understand exactly what you want. Maybe something
like this:

Dim strPath As String

c = ActiveDocument.CustomDocumentProperties("Project").Value

strPath = "G:\Project\" & c & "\Contacts\Word.doc"

If c is "MyProject", the variable strPath now holds the value:
G:\Project\MyProject\Contacts\Word.doc

Signature

Regards
Lene Fredborg
DocTools - Denmark
www.thedoctools.com
Document automation - add-ins, macros and templates for Microsoft Word

> Hi,
>
[quoted text clipped - 9 lines]
>
> Ben Z.
Benz - 20 Nov 2007 17:15 GMT
Yes, Thank you for your help!  

> I am not sure whether I understand exactly what you want. Maybe something
> like this:
[quoted text clipped - 21 lines]
> >
> > Ben Z.

Rate this thread:






 
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.