Microsoft Office Properties (OfficeProperties)
Purpose and use
The OfficeProperties document function enables the automatic setting of OpenXML Core Properties and Custom Properties in Office documents (Word, Excel, PowerPoint).
This includes both static values and dynamically calculated content via field-Value.
Typical use cases:
- Automatic document classification
- Company-wide corporate metadata
- Mapping of workflow information
- Addition of technical metadata (e.g., IDs, timestamps)
Basic Structure
<OfficePropertiesConfiguration>
<!-- Core Properties -->
<Title Value="Example Title" />
<Subject field-Value="Project.Subject" />
<Keywords Value="primedocs; metadata" />
<Description Value="Automatically generated Office-document" />
<Category Value="Reports" />
<ContentStatus Value="Final" />
<!-- Custom Properties -->
<CustomProperty Name="CustomerId" Type="Text" field-Value="Customer.Id" />
<CustomProperty Name="IsConfidential" Type="YesNo" Value="true" />
<!-- Globale Property-Referenzen -->
<GlobalCoreProperty Key="DocumentTitle" />
<GlobalCustomProperty Key="BusinessUnit" />
</OfficePropertiesConfiguration>
Configuration
The root container for all Core and Custom Properties is called OfficePropertiesConfiguration.
All elements are optional and can be combined as desired.
Core Properties
Core Properties correspond to the standardized metadata of an Office document (visible under File → Info).
Supported Core Property Elements
| Property | Description |
|---|---|
| Title | Document Title |
| Subject | Subject / Topic |
| Keywords | Keywords |
| Description | Description |
| Category | Category |
| ContentStatus | Editing Status |
Attributes (CorePropertyType)
| Attribute | Description |
|---|---|
| Value | Static Value |
| field-Value | Dynamic Value via Fields |
Note: Only
Valueorfield-Valueshould be set. An error is returned if afield-Valuepoints to an unknown field.
Custom Properties
Custom Properties allow freely definable metadata consisting of a Name, Type, and Value or field-Value.
<CustomProperty Name="CustomerId" Type="Text" field-Value="Customer.Id" />
Attributes
| Attribute | Description |
|---|---|
| Name | Name of the Property |
| Type | Text, Number, Date, YesNo |
| Value | Static Value |
| field-Value | Dynamic Value via Fields |
Globale Properties
Global Properties allow the use of centrally managed metadata in connection with Global Configurations .
Multiple "Global" references can be used, but an element may only be defined once - a duplicate Title or a duplicate CustomProperty will result in an error.
GlobalCoreProperty
<GlobalCoreProperty Key="DefaultCoreProperties" />
GlobalCustomProperty
<GlobalCustomProperty Key="CustomerRelatedProperties" />
Accessing dynamic Fields
The properties are written to the Word/Excel/PowerPoint file before the final document output.
Forms, Fields, Profile, and Data fields can be accessed via field-Value.