'Pick up Word user templates folder from Registry in win XP

  • Thread starter Thread starter E.Zenker
  • Start date Start date
E

E.Zenker

Hi
I have an old code sample:

'Pick up Word user templates folder from Registry
strTemplateDir = objWord.System.PrivateProfileString("",
"HKEY_CURRENT_USER\Software\Microsoft\Office\8.0\Common\FileNew\LocalTemplates",
"") & "\"

How must it be in win XP ?

There is no FileNew in the registy of xp.!!
please tel me how to do

E.Zenker
 
strTemplateDir = objWord.Options.DefaultFilePath(wdUserTemplatesPath)

Since about Word 2000, these values are in the registry only if they are
different from the default. The default location, in XP, is

C:\Documents and Settings\[User]\Application Data\Microsoft\Templates

where [User] is the login name.
 
Thanks for reply,

this:
strTemplateDir = objWord.Options.DefaultFilePath(wdUserTemplatesPath)
returns:
C:\Documents and Settings\[User]\OwnFiles (I use a german version means
"Eigene Dateien")

What must I use that strTemplateDir
returns:
C:\Documents and Settings\[User]\Application Data\Microsoft\Templates

or is it possible to use a variable [User] that can be easily put into the
template path.

Thank you
E. Zenker

Jezebel said:
strTemplateDir = objWord.Options.DefaultFilePath(wdUserTemplatesPath)

Since about Word 2000, these values are in the registry only if they are
different from the default. The default location, in XP, is

C:\Documents and Settings\[User]\Application Data\Microsoft\Templates

where [User] is the login name.




E.Zenker said:
Hi
I have an old code sample:

'Pick up Word user templates folder from Registry
strTemplateDir = objWord.System.PrivateProfileString("",
"HKEY_CURRENT_USER\Software\Microsoft\Office\8.0\Common\FileNew\LocalTemplates",
"") & "\"

How must it be in win XP ?

There is no FileNew in the registy of xp.!!
please tel me how to do

E.Zenker
 
I don't understand your question.
objWord.Options.DefaultFilePath(wdUserTemplatesPath) returns whatever you
see if you go to Tools > Options > File Locations -- either the default, or
whatever the user has chosen in place of the default. Yes it's possible to
put a variable into the file path

strPath = "C:\Docs and Settings\" & strName & "\....."

but unless that's the path that Word is using, there's not much point.


E.Zenker said:
Thanks for reply,

this:
strTemplateDir = objWord.Options.DefaultFilePath(wdUserTemplatesPath)
returns:
C:\Documents and Settings\[User]\OwnFiles (I use a german version means
"Eigene Dateien")

What must I use that strTemplateDir
returns:
C:\Documents and Settings\[User]\Application Data\Microsoft\Templates

or is it possible to use a variable [User] that can be easily put into the
template path.

Thank you
E. Zenker

Jezebel said:
strTemplateDir = objWord.Options.DefaultFilePath(wdUserTemplatesPath)

Since about Word 2000, these values are in the registry only if they are
different from the default. The default location, in XP, is

C:\Documents and Settings\[User]\Application Data\Microsoft\Templates

where [User] is the login name.




E.Zenker said:
Hi
I have an old code sample:

'Pick up Word user templates folder from Registry
strTemplateDir = objWord.System.PrivateProfileString("",
"HKEY_CURRENT_USER\Software\Microsoft\Office\8.0\Common\FileNew\LocalTemplates",
"") & "\"

How must it be in win XP ?

There is no FileNew in the registy of xp.!!
please tel me how to do

E.Zenker
 
Thanks
the settings in word are:
Documents: C:\Documents and Settings\[User]\OwnFiles
User Templates: C:\Documents and Settings\[User]\Application
Data\Microsoft\Templates
but:
strTemplateDir = objWord.Options.DefaultFilePath(wdUserTemplatesPath)
returns the path to Dokuments!!! not to the Templates!!! ???

what is wrong??

thanks for help
E.Zenker





Jezebel said:
I don't understand your question.
objWord.Options.DefaultFilePath(wdUserTemplatesPath) returns whatever you
see if you go to Tools > Options > File Locations -- either the default, or
whatever the user has chosen in place of the default. Yes it's possible to
put a variable into the file path

strPath = "C:\Docs and Settings\" & strName & "\....."

but unless that's the path that Word is using, there's not much point.


E.Zenker said:
Thanks for reply,

this:
strTemplateDir = objWord.Options.DefaultFilePath(wdUserTemplatesPath)
returns:
C:\Documents and Settings\[User]\OwnFiles (I use a german version means
"Eigene Dateien")

What must I use that strTemplateDir
returns:
C:\Documents and Settings\[User]\Application Data\Microsoft\Templates

or is it possible to use a variable [User] that can be easily put into
the template path.

Thank you
E. Zenker

Jezebel said:
strTemplateDir = objWord.Options.DefaultFilePath(wdUserTemplatesPath)

Since about Word 2000, these values are in the registry only if they are
different from the default. The default location, in XP, is

C:\Documents and Settings\[User]\Application Data\Microsoft\Templates

where [User] is the login name.




Hi
I have an old code sample:

'Pick up Word user templates folder from Registry
strTemplateDir = objWord.System.PrivateProfileString("",
"HKEY_CURRENT_USER\Software\Microsoft\Office\8.0\Common\FileNew\LocalTemplates",
"") & "\"

How must it be in win XP ?

There is no FileNew in the registy of xp.!!
please tel me how to do

E.Zenker
 
Hi again
I tried to replace (wdUserTemplatesPath)
with
(wdDocumentsPath) with no change of the result
what comes back is always:
C:\Documents and Settings\[User]\OwnFiles
although the file locations are different in options.

maybe the german version has some bugs.

maybe a better way is to do it like this:
strPath = "C:\Docs and Settings\" & strName & "\....."

but I do not know how to get the current user name to put it into the
variable strName.

thanks
E. Zenker

Jezebel said:
I don't understand your question.
objWord.Options.DefaultFilePath(wdUserTemplatesPath) returns whatever you
see if you go to Tools > Options > File Locations -- either the default, or
whatever the user has chosen in place of the default. Yes it's possible to
put a variable into the file path

strPath = "C:\Docs and Settings\" & strName & "\....."

but unless that's the path that Word is using, there's not much point.


E.Zenker said:
Thanks for reply,

this:
strTemplateDir = objWord.Options.DefaultFilePath(wdUserTemplatesPath)
returns:
C:\Documents and Settings\[User]\OwnFiles (I use a german version means
"Eigene Dateien")

What must I use that strTemplateDir
returns:
C:\Documents and Settings\[User]\Application Data\Microsoft\Templates

or is it possible to use a variable [User] that can be easily put into
the template path.

Thank you
E. Zenker

Jezebel said:
strTemplateDir = objWord.Options.DefaultFilePath(wdUserTemplatesPath)

Since about Word 2000, these values are in the registry only if they are
different from the default. The default location, in XP, is

C:\Documents and Settings\[User]\Application Data\Microsoft\Templates

where [User] is the login name.




Hi
I have an old code sample:

'Pick up Word user templates folder from Registry
strTemplateDir = objWord.System.PrivateProfileString("",
"HKEY_CURRENT_USER\Software\Microsoft\Office\8.0\Common\FileNew\LocalTemplates",
"") & "\"

How must it be in win XP ?

There is no FileNew in the registy of xp.!!
please tel me how to do

E.Zenker
 
You have cross-posted this thread to six newsgroups, only two of which
have anything to do with your question. Unfortunately, you missed the
one newsgroup where you're most likely to get an answer:
microsoft.public.de.word.vba.

Pleas repost your question there alone. There are at least four or
five German and Swiss MVPs who know a lot about VBA and who can tell
you whether the German version of Word has a bug. For anyone else it's
pure guessing.

--
Regards,
Jay Freedman
Microsoft Word MVP

Hi again
I tried to replace (wdUserTemplatesPath)
with
(wdDocumentsPath) with no change of the result
what comes back is always:
C:\Documents and Settings\[User]\OwnFiles
although the file locations are different in options.

maybe the german version has some bugs.

maybe a better way is to do it like this:
strPath = "C:\Docs and Settings\" & strName & "\....."

but I do not know how to get the current user name to put it into the
variable strName.

thanks
E. Zenker

Jezebel said:
I don't understand your question.
objWord.Options.DefaultFilePath(wdUserTemplatesPath) returns whatever you
see if you go to Tools > Options > File Locations -- either the default, or
whatever the user has chosen in place of the default. Yes it's possible to
put a variable into the file path

strPath = "C:\Docs and Settings\" & strName & "\....."

but unless that's the path that Word is using, there's not much point.


E.Zenker said:
Thanks for reply,

this:
strTemplateDir = objWord.Options.DefaultFilePath(wdUserTemplatesPath)
returns:
C:\Documents and Settings\[User]\OwnFiles (I use a german version means
"Eigene Dateien")

What must I use that strTemplateDir
returns:
C:\Documents and Settings\[User]\Application Data\Microsoft\Templates

or is it possible to use a variable [User] that can be easily put into
the template path.

Thank you
E. Zenker

strTemplateDir = objWord.Options.DefaultFilePath(wdUserTemplatesPath)

Since about Word 2000, these values are in the registry only if they are
different from the default. The default location, in XP, is

C:\Documents and Settings\[User]\Application Data\Microsoft\Templates

where [User] is the login name.




Hi
I have an old code sample:

'Pick up Word user templates folder from Registry
strTemplateDir = objWord.System.PrivateProfileString("",
"HKEY_CURRENT_USER\Software\Microsoft\Office\8.0\Common\FileNew\LocalTemplates",
"") & "\"

How must it be in win XP ?

There is no FileNew in the registy of xp.!!
please tel me how to do

E.Zenker
 
Thanks a lot for your help.

Jay Freedman said:
You have cross-posted this thread to six newsgroups, only two of which
have anything to do with your question. Unfortunately, you missed the
one newsgroup where you're most likely to get an answer:
microsoft.public.de.word.vba.

Pleas repost your question there alone. There are at least four or
five German and Swiss MVPs who know a lot about VBA and who can tell
you whether the German version of Word has a bug. For anyone else it's
pure guessing.

--
Regards,
Jay Freedman
Microsoft Word MVP

Hi again
I tried to replace (wdUserTemplatesPath)
with
(wdDocumentsPath) with no change of the result
what comes back is always:
C:\Documents and Settings\[User]\OwnFiles
although the file locations are different in options.

maybe the german version has some bugs.

maybe a better way is to do it like this:
strPath = "C:\Docs and Settings\" & strName & "\....."

but I do not know how to get the current user name to put it into the
variable strName.

thanks
E. Zenker

Jezebel said:
I don't understand your question.
objWord.Options.DefaultFilePath(wdUserTemplatesPath) returns whatever you
see if you go to Tools > Options > File Locations -- either the default,
or
whatever the user has chosen in place of the default. Yes it's possible
to
put a variable into the file path

strPath = "C:\Docs and Settings\" & strName & "\....."

but unless that's the path that Word is using, there's not much point.


Thanks for reply,

this:
strTemplateDir = objWord.Options.DefaultFilePath(wdUserTemplatesPath)
returns:
C:\Documents and Settings\[User]\OwnFiles (I use a german version
means
"Eigene Dateien")

What must I use that strTemplateDir
returns:
C:\Documents and Settings\[User]\Application Data\Microsoft\Templates

or is it possible to use a variable [User] that can be easily put into
the template path.

Thank you
E. Zenker

strTemplateDir = objWord.Options.DefaultFilePath(wdUserTemplatesPath)

Since about Word 2000, these values are in the registry only if they
are
different from the default. The default location, in XP, is

C:\Documents and Settings\[User]\Application Data\Microsoft\Templates

where [User] is the login name.




Hi
I have an old code sample:

'Pick up Word user templates folder from Registry
strTemplateDir = objWord.System.PrivateProfileString("",
"HKEY_CURRENT_USER\Software\Microsoft\Office\8.0\Common\FileNew\LocalTemplates",
"") & "\"

How must it be in win XP ?

There is no FileNew in the registy of xp.!!
please tel me how to do

E.Zenker
 
Back
Top