Skip to content

word sdt

zmworm edited this page Apr 29, 2026 · 50 revisions

Word: SDT / Content Control

Structured Document Tags (content controls) for forms and structured content.

Path: /body/sdt[N]

Operations

  • add - Add content controls

get

Returns: alias, tag, lock, id, sdtType, items, text, childCount

officecli get report.docx /body/sdt[1]

set

Property Description
alias/name Display name
tag Tag identifier
lock Lock mode
text Content text
officecli set report.docx /body/sdt[1] --prop alias="Full Name" --prop tag="name_field"
officecli set report.docx /body/sdt[1] --prop text="Default value"

query

Query content controls using the sdt or contentcontrol element type.

officecli query report.docx sdt
officecli query report.docx contentcontrol

remove

officecli remove report.docx /body/sdt[1]

Based on OfficeCLI v1.0.64

Clone this wiki locally