Word Set Property
Word Set Property
Section titled “Word Set Property”Type: word-set-property · Package: Word Activities v1.0.4
Sets a metadata field (property) of the document: title, author, subject, keywords, etc. Useful when generating documents so they carry the right information (author, title), or to classify them.
How it works
Section titled “How it works”Assigns value (converted to text) to the property set in property. It accepts session or path — see the two modes:
- With
path: opens the file, sets the property and saves it to the same path automatically. - With
session(or inside abody): sets it in memory; save afterwards with Word Save (Word Create withbodysaves by itself).
For Created and Modified, value must be a recognizable date (2026-03-14, 2026-03-14 09:30). If it cannot be read as a date, the property does not change and the activity does not fail. property is picked from the list; it does not accept expressions.
Required parameters
Section titled “Required parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
property | string | — | Property to set: Title · Author · Subject · Description · Keywords · Category · Created · Modified. |
value | object | — | Value to assign. Stored as text; for dates, a valid date. If the expression returns nothing, the property is left empty. |
Optional parameters
Section titled “Optional parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
session | ZoanWordSession | — | Session from Word Open or Word Create (instead of path). Inherited automatically inside a body. |
path | string | — | Path to the .docx (quick mode: opens, sets and saves by itself). Only used when there is no session. |
Output
Section titled “Output”This activity does not return a value.
Example
Section titled “Example”Word Create path = reportPath └─ body: Word Set Property property = Title value = "Monthly Report" Word Set Property property = Author value = "Reporting Robot" Word Append Paragraph text = "Monthly Report" style = TitleWord Get Property path = reportPath property = Title → output: titleCommon errors
Section titled “Common errors”| Message | Cause and fix |
|---|---|
'session' or 'path' is required. | There is no session and no path. |
File not found. | The path does not exist on the robot’s machine. |
'property' is required. | No property was chosen. |
Unknown property: '…'. | The property name is not in the supported list. |
Related activities
Section titled “Related activities”- Word Get Property — read a property.
- Word Create — create the document.