WordXP - DefaultFilePath

M

Marcel

Hi,

I'm using frequently Option.DefaultFilePath(wdUserTemplatesPath) and the
Option.DefaultFilePath(wdWorkgroupTemplatesPath) constructions to retrieve
the macro's rather than guessing where the macro's are. The problem I
encounter is that a lot of user have these option empty and this code end up
in an error.

Does someone know how I can retrieve these standard path information - there
must be something anywhere - when a user has a clean install and the fields
Tools>Options>Filelocations>Usertemplatepath and Workgrouptemplatepath are
empty?

Regards,

Marcel
 
J

Jonathan West

Hi Marcel,

the user templates path is normally the same as NormalTemplate.Path (but not
necessarily so in Mac vesions of Word)

The default is for the Workgroup template path not to be set. Youi should
check to see whether the path is empty and have a defined action for this
(e.g. to set it to some fixed path)
 
J

JB

Jonathan said:
Hi Marcel,

the user templates path is normally the same as NormalTemplate.Path (but not
necessarily so in Mac vesions of Word)

The default is for the Workgroup template path not to be set. Youi should
check to see whether the path is empty and have a defined action for this
(e.g. to set it to some fixed path)
Hi Marcel,
If your using an Win2k or XP you could always set a reg key that points
to this path. This assumes of course that you have some sort of share
point for your macros.

When you code your macros think about running some error code first to
solve your problem of the empty values in the TemplatePath sections,
second to maybe find out (if using a share point) if the expected
location of your templates exists and that the templates are in fact
there. From there on you can store a registry setting to read the path
info.

HTH

J
 
M

Marcel

Thanks You both for the reply.

I think I didn't make myself clear enough. Sorry. I meant when a computer
gets fresh installation of Office. These paths are normally not filled. But
Word still does know where to look for the templates and startup map. I
would like to know where I can find these 'hidden' path information.

Regards,

Marcel
 
P

Perry

These values are stored within the out-of-box office profile settings file
(*.ops).
You can manipulate/customize all settings, so you can access the out-of-box
values
as well.

Here's some more info.
http://www.microsoft.com/office/ork/2003/two/ch4/DepB02.htm

If you step up to yr IT team, and specifically the guess concerned with
application scripting/applicatie scripters, they will be able to tell you
how
to access these values ...
Take my information and the information as outlined in above url with you
....

Krgrds,
Perry
 
M

Marcel

Thanks Perry,

The stupid thing is I used the CWI myself to build customized Install Packs
for Office and ought to know this (...). The file path mentioned in the
profile (ops) are put into the registry but they are not filled in the
Tools, Options, File locations. Therefore it can't be sure that the initial
file path at install time is allways the same. If a company decide to use to
totally different path it will be a problem.

There is at least for the usertemplate path one other option and that is to
create programmatically a new dot file and save this dot. It will allways
get saved in the usertemplate map. Once saved, the templatepath can be asked
and used or filled in at the proper location in Tools, Options, File
location, User Templatepath.

Regards,

Marcel
 

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