Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / September 2006

Tip: Looking for answers? Try searching our database.

wdUserOptionsPath

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Martin - 08 Sep 2006 15:25 GMT
hello,

we have special made templates for word 2000 now i want to migrate to word
2003. in word 2000 there was a wduseroptionspath, you can find this option
under filelocations in word 2003 this is not a option anymore. Now i have
problem because the templates are looking for info but the location isn't
there anymore. I don't wont to change the whole code.
So does anybody now where i can change the location for wdUserOptionsPath???

Greetingz.
Jay Freedman - 08 Sep 2006 15:59 GMT
It most certainly is present in Word 2003. The proper syntax is

  Options.DefaultFilePath(wdUserOptionsPath)

How were you trying to use it?

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.

> hello,
>
[quoted text clipped - 8 lines]
>
> Greetingz.
Martin - 08 Sep 2006 16:16 GMT
When i look in the code is see:

IniLoc = Options.DefaultFilePath(wdUserOptionsPath) & "\labels.ini"

when i go in word2000 to the file locations i see 1 option more, user
options that i can't find in word2003!!! In this option there is a location
to a folder where all my *.txt and *.ini files are.

So i thought that wdUserOptionsPath is the code for that!!!!

> It most certainly is present in Word 2003. The proper syntax is
>
[quoted text clipped - 14 lines]
> >
> > Greetingz.
Jay Freedman - 08 Sep 2006 18:22 GMT
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/thr
ead/3bc7d3a0b453bc24/cba92a248a023b08?lnk=st&q=wdUserOptionsPath+group%3Amicroso
ft.public.word.*&rnum=8&hl=en#cba92a248a023b08


http://groups.google.com/group/microsoft.public.word.vba.general/browse_thread/t
hread/3650560117cc7679/b55724a62e0b0373?lnk=st&q=wdUserOptionsPath+group%3Amicro
soft.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.

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.

> When i look in the code is see:
>
[quoted text clipped - 31 lines]
>>>
>>> Greetingz.
Jean-Guy Marcil - 08 Sep 2006 19:11 GMT
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.
Jean-Guy Marcil - 08 Sep 2006 16:02 GMT
Martin was telling us:
Martin nous racontait que :

> hello,
>
[quoted text clipped - 6 lines]
> So does anybody now where i can change the location for
> wdUserOptionsPath???

On my machine with Word 2003 I just ran this code:

   MsgBox Application.Options.DefaultFilePath(wdUserOptionsPath)

and got the expected result.

"wdUserOptionsPath" is the path to the folder the user has defined as the
default folder to open/save documents.

Without knowing what your code does with this option, it is difficult to
offer any advice...

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org

Martin - 08 Sep 2006 16:23 GMT
When i look in the code is see:

IniLoc = Options.DefaultFilePath(wdUserOptionsPath) & "\labels.ini"

when i go in word2000 to the file locations i see 1 option more, user
options that i can't find in word2003!!! In this option there is a location
to a folder where all my *.txt and *.ini files are.

So i thought that wdUserOptionsPath is the code for that!!!!

> Martin was telling us:
> Martin nous racontait que :
[quoted text clipped - 21 lines]
> Without knowing what your code does with this option, it is difficult to
> offer any advice...
Jean-Guy Marcil - 08 Sep 2006 18:20 GMT
Martin was telling us:
Martin nous racontait que :

> When i look in the code is see:
>
> IniLoc = Options.DefaultFilePath(wdUserOptionsPath) & "\labels.ini"

On your Office 2003 machine, look in Tools > Options...> File Locations tab
> Documents.

Note down that path.

For the sake of clarity, let's say it points to "C:\MyDocuments"

Now, on the same machine, make sure that the file "labels.ini" is located in
the "C:\MyDocuments" folder and that you have read/write access to that
folder.

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org

Jean-Guy Marcil - 08 Sep 2006 19:08 GMT
Jean-Guy Marcil was telling us:
Jean-Guy Marcil nous racontait que :

> Martin was telling us:
> Martin nous racontait que :
[quoted text clipped - 14 lines]
> located in the "C:\MyDocuments" folder and that you have read/write
> access to that folder.

Sorry Martin, I did some more experimenting...and you can ignore my previous
message.  See my other post in reply to Jay.

If you do not want to change the code, run

   MsgBox Options.DefaultFilePath(wdUserOptionsPath)

to see where it points. Put you "labels.ini" file in that folder.

If it points to the same place as
   Options.DefaultFilePath(wdDocumentsPath)
then change the document folder path (Tools > Options > File Locations...),
restart Word and run the code again (Also in my other message in response to
Jay).

Otherwise, you are going to have to change the code.

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org

brian.noreply@gmail.com - 28 Sep 2006 23:44 GMT
> hello,
>
[quoted text clipped - 6 lines]
>
> Greetingz.

Here is how you can change it.  You can set this value in the registry.
I had the same issue and found that this worked for me.  This is the
same registry key that Word 97 saves the value to.  Word 2003 just
removed the setting in the file locations in Options.

[HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Word\Options]
"INI-PATH"="[Whatever location you want to set]"

-Brian
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.