wdUserOptionsPath

M

Martin

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.
 
J

Jay Freedman

It most certainly is present in Word 2003. The proper syntax is

Options.DefaultFilePath(wdUserOptionsPath)

How were you trying to use it?

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
J

Jean-Guy Marcil

Martin was telling us:
Martin nous racontait que :
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???

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...


--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
M

Martin

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!!!!
 
M

Martin

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!!!!
 
J

Jean-Guy Marcil

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.


--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
J

Jay Freedman

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.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
J

Jean-Guy Marcil

Jean-Guy Marcil was telling us:
Jean-Guy Marcil nous racontait que :
Martin was telling us:
Martin nous racontait que :


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

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.

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.

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
J

Jean-Guy Marcil

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
 
J

Jay Freedman

Jay Freedman was telling us:
Jay Freedman nous racontait que :


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
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
 
B

brian.noreply

Martin said:
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.

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top