Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Custom properties from Normal.dot doesn't reproduce in new documents

Status
Not open for further replies.

GrodanBoll

Programmer
Mar 6, 2002
45
0
0
ZA
Hi :)

I have some custom properties in my templates (i.e. letter.dot) that I use.
And these work like a charm.

I also have the same custom properties in the Normal.dot but they will not reproduce when I create a new document based on this normal.dot.

Why is that?


Thanks
Grodan
 
As far as I know, custom properties are a document property and are always blank on creating a new document. If you want to copy the properties to the new document from your template then you will need code to do it.

I could be wrong so take a quick look in MSDN if you have doubts..
 
It may help if you could give some more details of these.

I am trying to understand what the relevance is of letter.dot. Is the point that you can use custom properties of letter.dot (and presumably any other USER created template), but you can not use custom properties of normal.dot.?

Sorry, but that is the way it is.

There are only a very few Properties of Normal.dot that are carried into a new document.

Author and Company for example. Everything else is not...which actually makes sense.

Even real custom properties, such a Client are not carried into the newly created document, by default.

As has been pointed out, you CAN carry them over to a new document by code.

Gerry
 
Hi and thanks for your answers. =]

The custom properties are copied to a new document if I have them in any other template than "Normal.dot". And if I understand fumeis answer correctly that is the way it works?

So I should put the code to create the properties in the Document_New sub as usual?


Thanks
Grodan
 
Hi Grodan,

You can put code in Document_New if that's what you want but you should be aware that it doesn't fire when you open up Word and get a new empty document by default; it only fires when you explicitly create a new document from within Word.

Really if you want tailored documents you should use tailored templates and not Normal at all; Normal is rather too volatile.

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
Excel VBA Training and more Help at VBAExpress[
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top