Find unused templates

  • Thread starter Thread starter Flip
  • Start date Start date
F

Flip

Hi group,

Is there a nice way to find documents based on a named template on a pc or
even on a network?
I find many .dot's that are possibly not used anymore or even never were.

Or as a different approach, maybe we can make a listing sorted by the
documentproperty template?

Some templates may be available from other templates for instance adjusted
menu-items, and as such never used. I would like to find these
documents/templates also.

Flip
 
Hi group,

Is there a nice way to find documents based on a named template on a pc or
even on a network?
I find many .dot's that are possibly not used anymore or even never were.

Or as a different approach, maybe we can make a listing sorted by the
documentproperty template?

Some templates may be available from other templates for instance adjusted
menu-items, and as such never used. I would like to find these
documents/templates also.

Flip

It would be possible to write a VBA macro to open each document in a folder (or
a folder and its subfolders) and pull out the name of its currently attached*
template. It could put that information into a list in a Word document or,
probably better, an Excel worksheet. That could be sorted any way you like. You
could adapt the code in http://www.word.mvps.org/FAQs/MacrosVBA/BatchFR.htm for
opening and closing documents; yank out the code for doing find/replace and
substitute code for extracting the template name.

*Word files don't retain the names of their original templates. If a document
was based on one template but later switched to another, all you'll get is the
current template.

A VBA macro would be slow -- think hours or maybe days to crawl through a few
thousand documents on a network. A better alternative, if you can program in a
language such as VB or VB.Net, is to use DSOFile.dll
(http://www.word.mvps.org/FAQs/MacrosVBA/DSOFile.htm). This can get properties,
including the template name, from a document without having to open it first.

Templates don't "chain" the way your last paragraph proposes. Word can have
multiple "global" templates loaded at the same time as a document and its base
template, and the effect is additive, but a document can't get menu items or
other things by going through its base template to any other template. Refer to
http://www.shaunakelly.com/word/templaterelations/index.html and
http://www.shaunakelly.com/word/attachtemplate/index.html for some background on
this.
 
Jay Freedman said:
It would be possible to write a VBA macro to open each document in a
folder (or
a folder and its subfolders) and pull out the name of its currently
attached*
template. It could put that information into a list in a Word document or,
probably better, an Excel worksheet. That could be sorted any way you
like. You
could adapt the code in
http://www.word.mvps.org/FAQs/MacrosVBA/BatchFR.htm for
opening and closing documents; yank out the code for doing find/replace
and
substitute code for extracting the template name.

*Word files don't retain the names of their original templates. If a
document
was based on one template but later switched to another, all you'll get is
the
current template.

A VBA macro would be slow -- think hours or maybe days to crawl through a
few
thousand documents on a network. A better alternative, if you can program
in a
language such as VB or VB.Net, is to use DSOFile.dll
(http://www.word.mvps.org/FAQs/MacrosVBA/DSOFile.htm). This can get
properties,
including the template name, from a document without having to open it
first.

Templates don't "chain" the way your last paragraph proposes. Word can
have
multiple "global" templates loaded at the same time as a document and its
base
template, and the effect is additive, but a document can't get menu items
or
other things by going through its base template to any other template.
Refer to
http://www.shaunakelly.com/word/templaterelations/index.html and
http://www.shaunakelly.com/word/attachtemplate/index.html for some
background on
this.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup
so all may benefit.

Thanks for responding. I figured the question would be easier then the
answer.
Our network is not so big and there are some 150 templates 'around'. So a
macro as you suggested will do fine.
Thanks again,
Flip
 

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

Back
Top