Templates: UI says 'Normal' but OleDocumentProperties says otherwi

A

Andy

Hi there.

I've written a tool to scan and remove custom templates from Word documents.
To do this I'm using DSOFile.OleDocumentProperties.

I've ran into a problem where, in the UI it says the attached template is
the deault 'Normal' (http://kimag.es/share/88342570.jpg) but when the files
properties are queried in the code, it shows a custom template path
(http://kimag.es/share/94789763.jpg). Now I think it's likely that the file
did, at some point, have this template path but it has since been removed.

Conversely, there are other files that have had it manually removed that now
do show 'Normal' in both the UI and their properties.

I'm completely flummoxed.

Any ideas?
 
C

Cindy M.

Hi Andy,
I've ran into a problem where, in the UI it says the attached template is
the deault 'Normal' (http://kimag.es/share/88342570.jpg) but when the files
properties are queried in the code, it shows a custom template path
(http://kimag.es/share/94789763.jpg). Now I think it's likely that the file
did, at some point, have this template path but it has since been removed

I think what has happened is that the template wasn't available the last time
the document was opened. When Word can't find the template, it automatically
remaps to the local Normal.dot, but it remembers to what template it actually
belongs. If the document is later opened and the template is available in the
specified path, Word will link back up to it.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 
A

Andy

That makes sense. I thought it would be something along those lines but
really didn't know enough to base any action on. I'm not completely sure how
I'm going to differentiate between an unused template ref and a used one, but
hopefully there will be a flag in the properties that I've overlooked.


Thanks very much for taking the time to reply. It's definitely made things
clearer and it's much appreciated.
 

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