How do i set document property fields as required?

  • Thread starter Thread starter Dan
  • Start date Start date
D

Dan

Our office is required by our organizations policy to add meta data (document
properties) to all of our documents. As the person put in charge of making
sure that these policies are implemented consistently, I need a way of making
sure everyone inputs certain required meta data into the document properties.
We're using office 2007, and I haven't been able to find anywhere in the
options where you can set certain document properties as required.
 
Our office is required by our organizations policy to add meta data (document
properties) to all of our documents. As the person put in charge of making
sure that these policies are implemented consistently, I need a way of making
sure everyone inputs certain required meta data into the document properties.
We're using office 2007, and I haven't been able to find anywhere in the
options where you can set certain document properties as required.

There are no such options. You'll have to write a macro that checks the specific
document properties you require, and insert that macro into every template used
in the organization.

There are at least two ways to create such a macro.

One way is to name it FileSave so it will run instead of the built-in Save
command (http://word.mvps.org/FAQs/MacrosVBA/InterceptSavePrint.htm). This has
the drawback that it doesn't run if the user closes the document and answers Yes
to the prompt to save before closing -- that doesn't count as a "Save command".
So you also need to write a macro that runs when the document is closing
(http://word.mvps.org/faqs/macrosvba/PseudoBeforeClose.htm).

A second method is to write the macro as an event handler
(http://word.mvps.org/FAQs/MacrosVBA/AppClassEvents.htm) for the
DocumentBeforeSave event.
 
Back
Top