Publisher and Web Interface > Publisher > Creating and customizing Publisher styles > Including document properties in generated Word documents (Publisher)
Including document properties in generated Word documents (Publisher)
When generating Word documents, Publisher extracts some document properties in the generated document, such as the Title, Publish Date and Classification. You can extract other document properties by adding Word field codes to a Style's titlepage.xml and wordml.template.xml templates.
Important: We recommend that you do not include document properties in the provided Publisher Styles, but instead create a new Publisher Style and make the changes to that.
To add a DocProperty field code the titlepage.xml or wordml.template.xml template.xml template (for Word):
1. Open the Style's titlepage.xml or wordml.template.xml template.
For more information, refer to Customizing a Publisher style’s headers, footers & Word styles and Customizing a Publisher style’s title page.
2. Move the Word cursor to where you want to add the Word DocProperty field code.
3. On the Insert ribbon, click Quick Parts, and then click Field.
4. In the Categories list, select (All).
5. In the Field Names list, select the DocProperty entry.
6. In the Property list, select the entry for the property you want to add.
If the required property is not listed, select Author (you will change it later).
7. Click OK.
8. If the required document property was not available for selection: right-click the text that was added to the template, point to Toggle Field Codes, and change the text of the field code to extract the required document property. The following document properties can be extracted:
Document Property
Word Field Code
Author
{DOCPROPERTY Author \* MERGEFORMAT}
Classification
{DOCPROPERTY Classification \* MERGEFORMAT}
Contract Number Prefix
{DOCPROPERTY "Contract Number Prefix" \* MERGEFORMAT}
Copy.Number
{DOCPROPERTY "Copy Number" \* MERGEFORMAT}
Copy.Number.Prefix
{DOCPROPERTY "Copy Number Prefix" \* MERGEFORMAT}
Copyright
{DOCPROPERTY Copyright \* MERGEFORMAT}
Date.Prefix
{DOCPROPERTY Date.Prefix \* MERGEFORMAT}
Document.Number
{DOCPROPERTY "Document Number" \* MERGEFORMAT}
Document.Number.Prefix
{DOCPROPERTY "Document Number Prefix" \* MERGEFORMAT}
DRL Number Prefix
{DOCPROPERTY "DRL Number Prefix" \* MERGEFORMAT}
Footer.Span.Text
{DOCPROPERTY Footer.Span.Text \* MERGEFORMAT}
Footer.Text.Center
{DOCPROPERTY Footer.Text.Center \* MERGEFORMAT}
Footer.Text.Left
{DOCPROPERTY Footer.Text.Left \* MERGEFORMAT}
Footer.Text.Right
{DOCPROPERTY Footer.Text.Right \* MERGEFORMAT}
Header.Text.Center
{DOCPROPERTY Header.Text.Center \* MERGEFORMAT}
Header.Text.Left
{DOCPROPERTY Header.Text.Left \* MERGEFORMAT}
Header.Text.Right
{DOCPROPERTY Header.Text.Right \* MERGEFORMAT}
Publisher Date
{DOCPROPERTY Publisher Date \* MERGEFORMAT}
Revision
{DOCPROPERTY Revision \* MERGEFORMAT}
Revision Prefix
{DOCPROPERTY "Revision Prefix" \* MERGEFORMAT}
Subject
{DOCPROPERTY Subject \* MERGEFORMAT}
When the Word document is generated, the field code will be replaced with the document property value.