Field note / Build or buy
Can you automate your own Word templates with conditional clauses?
Yes, for a few rules. Word's IF and COMPARE fields can insert a clause when two facts match, and content controls and Quick Parts hold the facts and approved wording. Past a handful of rules, the logic hides in field codes few people can read or test. Then a product or a small custom build is easier to keep right.
What can Word do on its own?
A lawyer at a firm of two lawyers and an of-counsel described their starting point on r/LawFirm: “I don't like any of the canned documents … and want to use my own” (June 2026). Word gives you four tools for that:
- Content controls collect facts: text, picture, building block gallery, combo box, drop-down list, date picker and check box controls, from the Developer tab, which “isn’t displayed by default”. In a drop-down list, “users can only select from the list of choices.”
- Quick Parts let you “create, store, and reuse pieces of content”, such as an approved alternative clause.
- Fields. The IF field “compares two values and then inserts the text appropriate to the result of the comparison.” For two conditions, Microsoft says you can “create compound logical comparisons with And and Or functions in an = (Formula) field, and then you can use the result of the = (Formula) field in an If field.”
- Mail merge rules. “Use an If...Then...Else rule to show different text based on information in your data source.” The dialog takes one field, one comparison and one value.
Where does conditional logic break down in plain Word?
When rules combine, nest or need testing. The logic sits inside the document, out of sight, and Word never says a rule took the wrong branch.
- Hidden. You see the codes only if you “Press Alt+F9 to switch between viewing field codes and viewing field results”.
- Hand-nested. Two conditions mean nesting fields by hand, and braces cannot be typed: “Press Ctrl+F9, and then type the code within the brackets.”
- Full editing on Windows only. Microsoft says “full insertion and editing is supported only in Word for Windows desktop.”
- Silent. “If FalseText isn't specified and the comparison is false, the IF field has no result.” A mistyped value just drops the clause.
- Choices, not rules. The building block gallery control lets “users choose a specific block of text”; a person still decides.
An estate-planning lawyer who built templates with “(a lot of) conditional logic in Word” wrote, “I regularly hit Word’s limit for nesting and had to come up with workarounds” (r/LawFirm, August 2026). An r/legaltech commenter named the cause: “Mail merge and conditional fields break because the logic lives inside the document” (August 2026).
What does one clause with two conditions look like?
One approved sentence, one build, and test cases written first. Fictional rule: include guaranty paragraph G2 in a lease cover letter only when the tenant is a company and the term is more than 36 months.
In plain Word, following Microsoft's COMPARE example (each pair of braces inserted with Ctrl+F9):
{ IF { = AND( { COMPARE "{ MERGEFIELD TenantType }" = "Company" }, { COMPARE { MERGEFIELD TermMonths } > 36 } ) } = 1 "[G2 guaranty paragraph]" "" }
The same rule as template tags in a Word master (the Jinja2-style syntax python-docx-template and docassemble use):
{%p if tenant_type == "Company" and term_months > 36 %}
[G2 guaranty paragraph]
{%p endif %}
| Case | Tenant type / Term (months) | Expected | Why it is in the set |
|---|---|---|---|
| 1 | Company / 60 | G2 in | Both conditions true |
| 2 | Company / 36 | G2 out | Boundary: “more than 36” excludes 36 |
| 3 | Individual / 60 | G2 out | First condition false |
| 4 | Company / 12 | G2 out | Second condition false |
| 5 | LLC / 60 | Stop: ask the owner | A value nobody listed; the field code drops G2 without a warning |
| 6 | Company / blank | Stop: ask the owner | A missing fact; the document should not decide |
Reading. Cases 1–4 are easy either way. Case 5 is where plain Word goes quiet and prints a letter regardless; case 6 depends on how Word handles an empty field, so test it. Restrict tenant type to an approved list, and whatever tool you choose, check that it can make cases 5 and 6 stop the draft. Keep the table: it is the test set for every later change.
Have a clause like G2 and want a second opinion? Discuss one workflow in a short fit conversation; no documents needed.
What are the three honest paths?
Plain Word with discipline, a document-automation product, or a small build on your own templates. All three keep a Word master; they differ in where the rules live and who maintains them.
| Path | Where the rules live | Fits when | What it costs you |
|---|---|---|---|
| Plain Word discipline | A person's choice, Quick Parts, at most a few IF fields | Few conditions, one document, a named owner | Someone's attention on every matter |
| Document-automation product | The product's template markup and questions | Many combined conditions; several documents share facts | A subscription, setup per template, the vendor's roadmap |
| Custom build on your templates | Tags in your Word master; rules in reviewed code with a test set | No product connects to where your facts live, or you want reviewable rules | An owner for the code, and its upkeep |
Products. Gavel says to “Start with the Word templates your team already uses, then guide clients or staff through the right questions.” HotDocs, from Mitratech, describes “Smart templates that auto-populate clauses, figures, and jurisdiction-specific rules based on back-end logic” and says it “works within your existing word processing environment.” Test any product on your own six cases, not its demo.
Builds. With python-docx-template, “you insert jinja2-like tags directly in the document” while editing it in Word. docassemble calls itself “a free, open-source expert system for guided interviews and document assembly.” Word itself can bind content controls to data: “An XML mapping is a link between the text in a content control and an XML element in the custom XML data store for this document.” Power Automate's “Populate a Microsoft Word template” action fills plain text, combo box, drop-down list, image and repeating section controls only, and its connector is Premium.
How do you decide? A six-question worksheet
Answer six questions per clause or package. As an illustrative, untested rule of thumb: stay in plain Word unless question 1 or 2 points away from it, and stop at question 6 if there is no test set.
BUILD-OR-BUY WORKSHEET — one block per clause or package clause / package = ______________________ owner = __________ 1. How many conditions decide it, and do they combine? one fact -> plain Word | combined or nested -> product or build ____ 2. How many documents share the same facts? one -> plain Word | a package -> product or build ____ 3. How often does it go out? rarely -> a person choosing beats any automation ____ 4. Who will change the rules next year, and can they read them? nobody reads field codes -> keep rules out of fields ____ 5. Where do the facts live, and does a product connect to it? yes -> product | nothing connects -> build or stay manual ____ 6. How will you test a change before it goes out? no written test cases -> STOP; write them first ____ decision: plain Word / product / custom build / stop date: _____
Question 1 is the conditional-complexity row of the automate-first scoring worksheet. If the master still drifts, fix that first (when governance is enough). For a whole package, use the hub's build, buy or neither table.
What maintenance cost does nobody budget?
Every change to wording or rules is a small release: someone edits, someone approves, the test cases run again.
The estate-planning lawyer above said Word templates with conditional logic take “too much time to maintain, particularly when it comes to formatting and updating changes,” adding, “I know I need to rewrite from scratch, which I do every few years anyway” (r/LawFirm, May and June 2026). A commenter in the same thread: “Nothing will completely remove the need for maintenance and testing when it comes to conditional document automation.” Another, who says they build these systems: “You're not going to get away from upkeep.”
What goes unbudgeted: re-running tests after each change, the departure of the one person who understands the field codes, edits that break formatting, and the eventual rewrite. Log every change:
CHANGE LOG — one line per change date | clause | change | edited by | approved by | test cases re-run | result
What stays with a human?
The wording, the rules and the review. The responsible lawyer approves each clause and condition, decides cases nobody listed (5 and 6), and reviews every draft before it reaches a client. One r/LawFirm commenter noted that associates using automated templates “learn to click one button instead of the other, and do not spend much time looking at the alternative language” (May 2026).
What should you do first?
Pick one clause that goes wrong today. Write its rule as one sentence and get the owner's approval. Write six test cases like the G2 table, including an unlisted value and a missing fact. Try it in plain Word with one IF field. If the worksheet points to a product or a build, test one package with the hub note before choosing.
A clause that has outgrown plain Word is the kind of workflow we help evaluate and connect. Engineering scope and support are agreed separately. The responsible professional keeps legal review and decisions.
Please do not send confidential documents or client records. A conversation can start with the clause, its rule in one sentence, and the tools you already use.
Related field notes: How should you test legal document automation before rollout? · Commercial lease packages: where does repeated data entry come from?
Sources and their limits
Public research cutoff: 22 October 2026. Practitioner quotations are short excerpts from public, pseudonymous forum posts. Identities and roles are unverified, and some commenters sell tools or services. They show how the problem is described, not how common it is. Vendor descriptions are quoted from each vendor's own page, not tested or endorsed here. The G2 rule, field code, test cases, worksheet and rule of thumb are original synthetic material; the field code follows Microsoft's documented pattern and has not been run against a real data source.
- Reddit threads (accessed 22 October 2026): r/LawFirm document automation / drafting software (31 May 2026); r/LawFirm automated doc-prep recommendations (9 June 2026); r/legaltech struggles with legal document assembly automation (28 August 2026). Comment dates may differ from post dates.
- Microsoft, fields: IF field; Compare field; = (Formula) field; Insert, edit, and view fields in Word; Set the rules for a mail merge.
- Microsoft, controls and reusable content: Create a form in Word that users can complete or print; Create a fillable form; Use Quick Parts and AutoText; XMLMapping object (Word); Word Online (Business) connector. All Microsoft pages accessed 22 October 2026.
- Vendors and open-source projects, each describing itself (accessed 22 October 2026): Gavel; HotDocs (Mitratech); python-docx-template documentation; docassemble and its document assembly documentation. Cited only for what each says it does.
For practice context, see how Stratum Relay works. This organizational engineering attribution is not a statement that a lawyer, client or named individual has reviewed or endorsed the note.