Difference between revisions of "Document Properties"
Line 12: | Line 12: | ||
[[File:Document Properties Definition.jpg|300px|thumb|left|Example 1: Definition of properties for the Document Properties macro as defined in the Word document]] | [[File:Document Properties Definition.jpg|300px|thumb|left|Example 1: Definition of properties for the Document Properties macro as defined in the Word document]] | ||
− | This relies on the property Names being defined in the | + | This relies on the property Names being defined (via the '''Custom''' tab under '''Advanced Properties''') in the Microsoft Word document on which the generated document is based, and placeholders being included in the document itself where you want the value of this property to be inserted. The [[BPP Document]] and the [[Audit and Compliance]] document already include such properties and value placeholders. For the [[BPP Document]], the '''Document Properties''' macro is automatically inserted as a part of the [[BPP Macros Set]]. ''Example 1'' shows the predefined custom properties for the [[BPP Document]]. |
In the example shown, the properties are shown '''before''' the document has been generated, so the '''Value''' texts default to be the same as the '''Name'''. When the document is generated, each text in the '''Value''' column is replaced with the contents of the '''Value''' property for the associated '''Name''' property, taken from the '''Document Properties''' macro. | In the example shown, the properties are shown '''before''' the document has been generated, so the '''Value''' texts default to be the same as the '''Name'''. When the document is generated, each text in the '''Value''' column is replaced with the contents of the '''Value''' property for the associated '''Name''' property, taken from the '''Document Properties''' macro. | ||
Line 23: | Line 23: | ||
[[File:Document Properties Document.jpg|500px|thumb|left|Example 3: Generated BPP Document showing Document Properties macro placeholders]] | [[File:Document Properties Document.jpg|500px|thumb|left|Example 3: Generated BPP Document showing Document Properties macro placeholders]] | ||
<br clear=left> | <br clear=left> | ||
+ | |||
==Properties== | ==Properties== | ||
* [[Comment]] | * [[Comment]] |
Revision as of 17:30, 11 August 2019
Scope
- Simulation project > Document Properties macro
Use
From within the Project Editor, select the Start step, and then select menu option Insert > Insert Documentation Macro > Document Properties.
Purpose
The Document Properties macro provides a way of including additional, custom information into a generated document. For example, you may have a requirement to have the name of the person who approved the simulation/document for release to be included on the actual generated document. To do this, you could define a property of Approver, and then set the value of this property to the name of the approver.
You can provide up to six custom properties in a single Document Properties macro. If you need more than six custom properties, just use multiple Document Properties macros.
This relies on the property Names being defined (via the Custom tab under Advanced Properties) in the Microsoft Word document on which the generated document is based, and placeholders being included in the document itself where you want the value of this property to be inserted. The BPP Document and the Audit and Compliance document already include such properties and value placeholders. For the BPP Document, the Document Properties macro is automatically inserted as a part of the BPP Macros Set. Example 1 shows the predefined custom properties for the BPP Document.
In the example shown, the properties are shown before the document has been generated, so the Value texts default to be the same as the Name. When the document is generated, each text in the Value column is replaced with the contents of the Value property for the associated Name property, taken from the Document Properties macro.
An example of the Document Properties macro for the BPP Document is shown in Example 2. You can easily correlate the custom properties in the Word document to the properties defined in the macro.
To tie it all together, Example 3 shows the section of the generated BPP Document where the custom document properties are used (this is at the bottom of the first page). In this example, the placeholder fields into which the property values are placed are shaded, and the field codes (instead of their values) are shown, so you can see the property names.