default filepath in XP

S

src

I've had this same problem, been driving me crazy for over a month!

For whatever reason, you need to clear the wdUserTemplatesPath first,
then set the value.

Options.DefaultFilePath(Path:=wdUserTemplatesPath)=""
Options.DefaultFilePath(Path:=wdUserTemplatesPath)="C:\Documents and
Settings\username\Application Data\Microsoft\Templates"

Only seems to be a problem in Word XP (2002) and only for
UserTemplatesPath. All others (WorkgroupTemplatePath, StartupPath,
etc.) update with no problem.



|| Options.DefaultFilePath(Path:=wdUserTemplatesPath)="C:
\Documents and
|| Settings\username\Application Data\Microsoft\Templates"
||
|| Now, in Word XP, this code results in an error:
|| Run-time error 4101
|| Illegal function call
||
|| If I use the macro recorder, to "set" the same path, I am
unsuccessful
|| (won't let me select this folder), but if I use the macro recorder
to "set"
|| the path to "C:\" , I am successful, and then don't get the error
on
|| running the sub. Is there some different kind of permissions
structure for
|| XP files for my chosen filepath in XP, or else what's the deal,
guys?
||

Works OK here (I pasted your code in a Word XP module).
Are you sure you did not forget to change "username" for the actual
name?
Just checking... you never know! I have done much dumber mistakes!
--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 

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