Hello,
While writing VBA code, I encounter a problem.
I want to save files in a the Documents map, as is set in Word by:
Tools > Options > File Locations > Documents. e.g.: D:\DocumentMap
I can read that file location with: str_StartPath =
Options.DefaultFilePath(wdDocumentsPath)
That works fine, untill I save (manually) a Word document in another
location, e.g. C:\OtherMap then the next time I run the code,
str_StartPath gives that new location (C:\OtherMap), as the default
save map
However, when I check the location manually (in Word) Tools > Options
> File Locations > Documents: the original path (D:\DocumentMap) is
still there and hasn't changed.
Is there a way to read the right location (D:\DocumentMap) which is
seen in Tools > Options > File Locations > Documents, even if the
current document path has changed through a manual action? I mean: how
can I read the correct path (D:\DocumentMap) under any circumstances,
regardless of any (saving) action in Word manually, through VBA code?
Thanks in advance.
Sunouchi
Jonathan West - 20 Jul 2007 19:11 GMT
> Hello,
> While writing VBA code, I encounter a problem.
[quoted text clipped - 18 lines]
> can I read the correct path (D:\DocumentMap) under any circumstances,
> regardless of any (saving) action in Word manually, through VBA code?
How to retrieve Word's default Documents path or Pictures path setting
http://www.word.mvps.org/FAQs/MacrosVBA/GetDocPath.htm

Signature
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Sunouchi@ - 20 Jul 2007 19:58 GMT
>> Hello,
>> While writing VBA code, I encounter a problem.
[quoted text clipped - 21 lines]
>How to retrieve Word's default Documents path or Pictures path setting
>http://www.word.mvps.org/FAQs/MacrosVBA/GetDocPath.htm
Wow, Jonathan! Thanks a lot.
Sunouchi@ - 20 Jul 2007 20:09 GMT
>>> Hello,
>>> While writing VBA code, I encounter a problem.
[quoted text clipped - 23 lines]
>
>Wow, Jonathan! Thanks a lot.
Hello Jonathan,
the '.setting' doesn't show up after the
(wdDialogToolsOptionsFileLocations) and is not a part of the list of
the possible (what is the name of these things?) choises, as is, e.g.
Creator or Show. How comes?
Thanks in advance.
Sunouchi
Jonathan West - 21 Jul 2007 13:43 GMT
> Hello Jonathan,
> the '.setting' doesn't show up after the
> (wdDialogToolsOptionsFileLocations) and is not a part of the list of
> the possible (what is the name of these things?) choises, as is, e.g.
> Creator or Show. How comes?
Because each dialog is different, and the Intellisense isn't bright enough
to cope. There is a help topic "Built-in dialog box argument lists" in the
Word VBA Help that lists the available arguments. This article may also help
Getting help with calling Word's built-in dialogs using VBA (and why doing
so can be much more useful than you'd think)
http://www.word.mvps.org/FAQs/MacrosVBA/WordDlgHelp.htm

Signature
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup