Auto - FilePath?

B

Benz

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.
 
L

Lene Fredborg

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

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

Benz

Yes, Thank you for your help!

Lene Fredborg said:
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

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top