
Set Word Path to Path of Current Document -- How to?
Thanks. With your help, I got what I needed:
currpath = ActiveDocument.Path
ChangeFileOpenDirectory currpath
I used the ChangeFileOpenDirectory function instead of the DefaultFilePath
function because I didn't want to change the permanent document path (a la
Tools \ Options \ File Locations \ (File type: Documents). I just wanted to
change the directory where word looks the next time File \ Open is selected.
Thanks again for your help.
Quote:
> Hi Gray,
> > I'm looking for the functions needed to:
> > (1) determine the path of the currently open document.
> ActiveDocument.Path will return the path of the current document
> > (2) determine the current "word document path" (i.e. wherever you would
> open
> > to if you simply selected "File \ Open" at that instant). This is not
> > necessarily the same as the default document path set in Tools \ Options
\
> > File Locations, or by use of the DefaultFilePath function.
> Actually, the DefaultfilePath function does give you the current folder,
and
> not the My Documents folder.
> > (3) set the "word document path" (i.e. wherever you would open to if you
> > simply selected "File \ Open" at that instant) to the path of the
> currently
> > open document.
> ChDir ActiveDocument.Path
> --
> Regards
> Jonathan West - Word MVP
> MultiLinker - Automated generation of hyperlinks in Word
> Conversion to PDF & HTML
> http://www.multilinker.com
> Word FAQs at http://www.multilinker.com/wordfaq
> Please post any follow-up in the newsgroup. I do not reply to Word
questions
> by email