using code to determine the file location

S

Southern at Heart

My template has code in AutoNew()
I need to asign strFileLocation as the file location of the template
How do I do this?
thanks.
 
J

Jay Freedman

Southern said:
My template has code in AutoNew()
I need to asign strFileLocation as the file location of the template
How do I do this?
thanks.

strFileLocation = ThisDocument.FullName

The key point here is that ThisDocument represents the template containing
the running code, not the active document (which would be ActiveDocument).

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 

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