-
Notifications
You must be signed in to change notification settings - Fork 610
word fieldchar
goworm edited this page Jun 26, 2026
·
1 revision
Field-character marker (w:fldChar) — an inline atom that delimits a complex field's begin / separate / end boundaries.
Path: /body/p[@paraId=X]/r[N]
- set - Adjust an existing field character's type
- get - Read a field character's type
- query - Find field characters
- remove - Delete a field character
Parent: paragraph
| Property | Required/Default | Description |
|---|---|---|
fieldCharType |
required | Boundary type: begin, separate, or end. Aliases: fieldchartype. |
| Attribute | Type | Description |
|---|---|---|
fieldCharType |
enum | The fldChar fldCharType attribute (begin, separate, or end). |
# Read a field character's type
officecli get report.docx "/body/p[@paraId=X]/r[N]"
# Change a field character's boundary type
officecli set report.docx "/body/p[@paraId=X]/r[N]" --prop fieldCharType=separate
# Find all field characters
officecli query report.docx fieldChar
# Remove a field character
officecli remove report.docx "/body/p[@paraId=X]/r[N]"- Atomic add is intentionally NOT supported — a
fldCharin isolation is invalid OOXML. To insert a complete field, use--type field, which writes a full begin + instrText + separate + cached + end sequence as one unit. -
get/seton individual field characters supports audit→fix workflows: inspect an existing field's structure and adjust it in place. - Field characters appear inside runs, so the path targets a run (
r[N]) within a body, header, or footer paragraph.
- Field - Insert complete fields as a single unit
- Run - The inline run that contains a field character
- Paragraph - The parent element
- Word Reference - All Word elements
Based on OfficeCLI v1.0.119