peter,
thank said:
You don't need to use any special dll if you're doing this in VBA or
VBScript, just create an instance of Word.Application, and an instance of
each document in > turn, then query the properties
as i'm quite new to vb i still have a question: there are lots of documents
i have to query. if possible i dont want to open every document just to read
the template-properties. (dsofile.dll allows you to read/change properties
without opening the document). so you propose to create an instance of each
document, can i do this without opening the doc's ??
thank you very much
tim
"Peter" <peterguy -at- hotmail -dot- com> schrieb im Newsbeitrag
tim moor said:
dear vba gurus,
i'd like to read the template path of a few hundreds doc's in a
directory.
for that reason i created a vba script to access the doc-properties (with
the help of dsofile.dll).
is there a way on how i can access the path and the name of the document
template ?
thank you very much
tim
Document.AttachedTemplate will give you the name of the template
Application.Options.DefaultFilePath(wdUserTemplatesPath) will give you where
the user templates are stored
Application.Options.DefaultFilePath(wdWorkgroupTemplatesPath) will tell you
where the workgroup templates are stored.
Combine the name of the template and the path, then use the Dir command to
test for the existence of the template. If it doesn't exist in one place,
test for it in the other.
You don't need to use any special dll if you're doing this in VBA or
VBScript, just create an instance of Word.Application, and an instance of
each document in turn, then query the properties.
hth,
-Peter