Customized document properties

R

Roderick O'Regan

I'm using Word 2007 in Windows Vista Business.

A few weeks ago I created a template for a client which required a
number of custromized document properties (I'll call this template
"Old template").

The client then created documents based on this template.(These I'll
call "Old Docs").

A week or so later, this client wanted an additional item incorporated
into the same template in the shape of another customized document
property to be added and accessed through VBA (I'll call this the
"Updated template").

When the customer came to open an "Old Docs" and which now referenced
the "Updated tempate" and error occurred. The VBA in the template was
looking for a customized document property which was not in the "Old
Docs" document.

I tried writing some code in the AutoOpen procedure of the "Updated
Template" to say something like "If you cannot find the newly added
customized document property in the "Old Docs" then add it and
continue with the procedure."

By the way, this property which I'll give the name of "Structure" has
a boolean Yes/No value set with 'Yes' being the default.

Try as I might I just could not get this to happen. Any thoughts on
this, please?

Roderick
 
D

Doug Robbins - Word MVP

You should use Document Variables in place of Custom Document Properties

And if your template contains code to read the values of variables, you need
to trap for 5825 errors, which will occur if there is a variable missing
from the document.

--
Hope this helps,

Doug Robbins - Word MVP

Please reply only to the newsgroups unless you wish to obtain my services on
a paid professional basis.
 

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