officecli-word-form

Creates fillable Word forms with content controls, checkboxes, merge fields, and document protection.

Updated Aug 19, 2026
One-click install
npx skills add https://github.com/Dhanuzh/DCode-Core --skill officecli-word-form-dhanuzh
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: officecli-word-form
Source: https://github.com/Dhanuzh/DCode-Core/tree/main/crates/dcode-app/assets/builtin-skills/officecli-word-form
Command: npx skills add https://github.com/Dhanuzh/DCode-Core --skill officecli-word-form-dhanuzh

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building a genuinely fillable Word form requires more than typing underscores on a page: it needs structured SDT content controls, legacy FormField checkboxes, MERGEFIELD placeholders, and document protection so only the intended fields are editable. Doing this by hand in OpenXML is error-prone, and most document tools cannot create these field types at all. ## Core Features & Use Cases - Structured form fields via OfficeCLI: Add text, richtext, dropdown, combobox, date, picture, and group SDT content controls with alias, tag, items, format, and lock properties, plus legacy FormField checkboxes (the only real checkbox type supported). - Mail-merge and protection: Insert MERGEFIELD, REF, SEQ, and IF complex fields for template-time data merge, then enforce protection=forms so end users can only fill fields while the rest of the document stays locked. - Use Case: An HR team needs an employee onboarding intake form where new hires type their name, pick a start date from a date picker, select a department from a dropdown, and tick a policy-agreement checkbox, while all legal text remains read-only. ## Quick Start Ask the AI to create a fillable employee onboarding intake form in Word with a full-name text field, a start-date picker, a department dropdown, an agreement checkbox, and forms protection enabled.

Frequently Asked Questions about officecli-word-form

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a fillable Word form with content controls?

Use OfficeCLI to add SDT content controls with commands like officecli add form.docx /body --type sdt --prop type=text --prop alias="Full Name" --prop tag=full_name. Finish by setting protection=forms so users can only edit the fields.

How do I add a real checkbox to a Word document programmatically?

Use a legacy FormField, not an SDT: officecli add form.docx /body --type formfield --prop type=checkbox --prop name=agree_terms --prop checked=false. SDT type=checkbox is not implemented and exits with an error.

Can I add dropdown items to a Word content control from the command line?

Yes, pass items directly on add: --prop type=dropdown --prop items="Engineering,Finance,HR". If the stored value must differ from the display text, use raw-set to append w:listItem elements with separate w:value attributes.

Why does my Word form edit fail with a document protected error?

Once protection=forms is set, non-field content edits are refused and require --force or raw-set. Form-field edits on SDT elements still succeed, so finish all static layout changes before enabling protection.

What is the difference between MERGEFIELD and SDT content controls in Word?

MERGEFIELD is a template-time placeholder filled by a downstream mail-merge engine and appears only in query field output. SDT controls are user-fillable fields listed by view forms, and both can coexist in one document.

When should I not use this Word form skill?

Do not use it for regular reports, letters, memos, academic papers, or any document with no user-fillable fields. Those documents should be routed to the officecli-docx skill or one of its scene layers instead.