Link to home
Start Free TrialLog in
Avatar of hckynt
hckynt

asked on

MS Word VBA Code

Greetings Experts!

Does anyone out there know some code to insert just the file's path without the file name (i.e. Filename \p)?  What I am trying to do is stamp the doc first with the path, go to the next line down on the page and then insert the file name.  Any help is appreciated.  Thanks!
Avatar of mwharff
mwharff

Try

msgbox ActiveDocument.Path

Hope this helps
Avatar of hckynt

ASKER

Anyway I can write it into the document instead of displaying it as a message box?  The problem is that previously I used the filename \p asigned to a button.  We re-organized our file structure and now the stamp is too long.  As a result, I wanted the path to show on one line and the file name to appear on  the next line down.

Thanks!
ASKER CERTIFIED SOLUTION
Avatar of mwharff
mwharff

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of hckynt

ASKER

Excellent, thanks!  Exactly what I wanted.