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
discussions to refer to:
http://groups.google.com/group/micr...t.public.word.*&rnum=8&hl=en#cba92a248a023b08
http://groups.google.com/group/micr...t.public.word.*&rnum=7&hl=en#b55724a62e0b0373
According to
http://support.microsoft.com/kb/157464, "Word 97 stores
all of its settings in the Windows registry; Word 97 no longer stores
information in an .ini file or in the Winword.opt file the way
earlier versions of Word did." It appears that the User Options path
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?
--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site:
http://www.word.mvps.org