Jay
Fri Sep 08 19:48:47 CDT 2006
On Fri, 8 Sep 2006 14:11:24 -0400, "Jean-Guy Marcil"
<NoSpam@LeaveMeAlone> wrote:
>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/microsoft.public.word.word97vba/browse_thread/thread/3bc7d3a0b453bc24/cba92a248a023b08?lnk=st&q=wdUserOptionsPath+group%3Amicrosoft.public.word.*&rnum=8&hl=en#cba92a248a023b08
>>
>>
http://groups.google.com/group/microsoft.public.word.vba.general/browse_thread/thread/3650560117cc7679/b55724a62e0b0373?lnk=st&q=wdUserOptionsPath+group%3Amicrosoft.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?
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.