
Signature
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
Jay Freedman was telling us:
Jay Freedman nous racontait que :
> That's been obsolete since Word 97, and it's retained in VBA only for
> backward compatibility. Here are a couple of old newsgroup
[quoted text clipped - 10 lines]
> was retained in the File Locations dialog in Word 97 and 2000, but
> then dropped because there's no reason to set it.
Very weird, this morning I tried the following code:
Sub test()
MsgBox Options.DefaultFilePath(wdUserOptionsPath)
MsgBox Options.DefaultFilePath(wdDocumentsPath)
End Sub
and both statements returned the exact same thing:
X:\Office 2003
which is the folder I selected as the document folder 2 minutes after
installing Word over a year ago.
I ran the code a few times after quitting/restarting Word, always the same
result.
So I thought that MSFT had decided to let wdUserOptionsPath point to the
same folder as wdDocumentsPath (It made some sort of sense in my twisted
mind since Option is not used anymore..).
Then, to be sure, I changed the path in the File Locations tab of the
Options dialog and ran the code again.
This time I got two different results:
Options.DefaultFilePath(wdUserOptionsPath) = X:\Office 2003 (Still!)
Options.DefaultFilePath(wdDocumentsPath) = X:\Office 2003\Test (The new
path I had set)
So, again to make sure, I restarted Word and ran the code again, and I got
different results again:
Options.DefaultFilePath(wdUserOptionsPath) = c:\program files\common
files\system\msmapi\1033
Options.DefaultFilePath(wdDocumentsPath) = X:\Office 2003\Test (The new
path I had set)
I have since changed the Documents folder path and restarted Word numerous
times; now wdUserOptionsPath consistently points to the 1033 folder.
Really weird, no?

Signature
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org
Jay Freedman - 09 Sep 2006 01:48 GMT
>Jay Freedman was telling us:
>Jay Freedman nous racontait que :
[quoted text clipped - 54 lines]
>
>Really weird, no?
I'll see your weird and raise you $5 :-)
I just tried the same thing you described. In my case, after
restarting Word, the UserOptionsPath returns "c:\program
files\symantec antivirus" (!).
A bit more about this: When you haven't customized your Documents
location, there is no registry entry to tell Word where that location
is, so it uses its internal default of the My Documents folder for the
current profile. As soon as you do customize it, you get a DOC-PATH
value under the key
HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Word\Options to
contain the new value. If you later set the Documents location back to
the My Documents folder, the registry value disappears.
It seems that the UserOptionsPath initially points to the same folder
as the Documents path, but when the registry entry comes into
existence then the UserOptionsPath gets set to some completely random
place in the file system. The odd part is that it doesn't change again
after the Documents path is reset and DOC-PATH gets removed. I
couldn't find that string in any Office-related part of the registry,
either.
--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.