With the function document_property you can set a predefined Microsoft Word or OpenOffice.org document property.
The function result is a word processor instruction that will set the specified document property. The model must produce this instruction in the result document to have effect.
document_property ( property_name; set_to_text )
This function yields a value of type TEXT.
The function document_property has two parameters, divided by semicolons (;):
The document_property function is only supported for Microsoft Word, and OpenOffice.org models. In all other word processors, the function is ignored.
The document_property function recognizes the following predefined Microsoft Word document properties. These properties are supported for both DOC and DOCX models.
Property |
Value |
|---|---|
Title |
Any text |
Category |
Any text |
Subject |
Any text |
Author |
Any text |
Keywords |
Any text |
Comments |
Any text |
Manager |
Any text |
Company |
Any text |
Createtime |
Date |
Printtime |
Date |
Savetime |
Date |
Status (DOCX only) |
Any text |
The date for the Createtime, Printtime and Savetime properties must be specified as a text, in either YYYYMMDD or YYYYMMDDhhmmss format. An optional DATE: prefix is allowed.
Example
@(document_property("Title"; "This is the document title"))
@(document_property("Createtime"; "20041231124353"))
All properties that are not recognized as a predefined property are added to the custom property list of the document. The type of the property can be set by adding a prefix to the value.
Type |
Prefix |
|---|---|
Text property |
None |
Date property |
DATE: |
Number property |
NUMBER: |
When Dates must be added to the Custom property list they must be specified in either DATE:YYYYMMDD or DATE:YYYYMMDDhhmmss format. The prefix Date: is not optional.
Example
@(document_property("Archival ID"; "KR35A"))
@(document_property("Date Received"; "DATE:20010702"))
@(document_property("Document Number"; "NUMBER:53245"))
The function document_property recognizes the following OpenOffice.org document properties:
Property |
Value |
Note |
|---|---|---|
Comment |
Any text |
|
Creator |
Any text |
OpenOffice.org 1.0.2 will ignore this value if the PrintBy property is set. |
CreateTime |
Date |
|
InitialCreator |
Any text |
|
Keywords |
Any text |
Must be a single line of text. |
PrintBy |
Any text |
|
PrintTime |
Date |
This property is ignored unless PrintBy is also set. |
SaveTime |
Date |
|
Subject |
Any text |
|
Template |
URL |
|
Title |
Any text |
|
any custom |
Any text |
All properties that are not recognized as a predefined property are added to the custom property list. If the property is an existing User Defined property, the value of this property will be changed otherwise the property is saved (except for OpenOffice.org 1.0.2). You can define a maximum of 4 custom properties. |
The date for the CreateTime, PrintTime and SaveTime properties must be specified as a text, in either YYYYMMDD or YYYYMMDDhhmmss format.
Example
@(document_property("Title"; "This is the document title"))
@(document_property("Createtime"; "20010101124353"))
Note
The names of the properties are case-insensitive.
It may depend on external conditions (like the underlying file system) how accurate the date will be saved by Microsoft Windows and shown by your word processor.