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