Document Editing Problems

Use Word IF Fields for Conditional Numbering and Children's Details

Phi Hung VoPhi Hung Vo Nov 14, 2026 869 views

Question details

Create a legal Word template that conditionally displays children's details and adjusts the Family Home paragraph number.

Use Word IF Fields for Conditional Numbering and Children's Details
Product
Microsoft Word
Device & OS
not provided
Scenario
A legal template needs lettered entries for children's names and dates of birth when children exist.
Observed behavior
The intended result is to show the Family Home paragraph as paragraph 3 when children exist and paragraph 2 when there are none.
Before you start

Decide where the template will store the number of children and which later paragraph numbers depend on it. The example below uses a custom document property named ChildrenCount; its value must be updated when the number of children changes.

Solution 1Recommended

Use nested IF fields and manual numbering in Word

Use this approach to show child entries and choose the Family Home number based on a stored child count.

The examples use Word field braces, not ordinary braces typed on the keyboard. On Windows, press Ctrl+F9 for each pair of field braces, including the nested DOCPROPERTY field.

The child count controls which entries appear, but it does not collect names or dates automatically. Enter those details in the corresponding field results.

1
Create the child-count property

In Word, open File > Info > Properties > Advanced Properties, then select the Custom tab. Add a Number property named ChildrenCount and set it to the number of children.

2
Insert the first conditional entry

At the location for the children's list, use Ctrl+F9 to build a field like { IF { DOCPROPERTY ChildrenCount } >= 1 "a. Child's name and date of birth" "" }. Replace the sample details with the child's information. Insert a paragraph break inside the first quoted result, after the details, so the following content starts on a new paragraph when the entry is shown.

3
Add further child entries

Place another IF field immediately after the first. For the second child, use the same structure with >= 2 and a manually typed "b." entry. Repeat with the appropriate count and letter for each additional entry.

4
Set the Family Home number

Immediately after the conditional entries, insert { IF { DOCPROPERTY ChildrenCount } > 0 "3. Family Home" "2. Family Home" }. Type the numbers as text rather than applying Word's automatic numbering.

5
Update and test the fields

Change ChildrenCount on the Custom tab, select the document with Ctrl+A, and press F9 to update fields. Test counts of zero and one or more; update an individual field with F9 if needed. Apply the same IF structure to later paragraphs whose numbers must change.

Use nested IF fields and manual numbering in Word
Check the finished template: Include a conditional entry for every child the template needs to display, and verify paragraph breaks and later numbering for each relevant child count.
Free Microsoft Office alternative

Edit Legal Documents with WPS Writer

WPS Office is a free, lightweight Office alternative with a familiar interface for opening and editing documents. Its Microsoft Word format support makes it easier to move existing files into a WPS workflow. For the specific Word IF-field setup above, use Word and test the template there.

Edit legal documents and manually numbered paragraphs in WPS Writer.Open and save Microsoft Word DOC and DOCX files.Work in a familiar interface that helps make migration from Office straightforward.Use a free, lightweight suite for everyday document editing.
microsoft office alternative - wps office

Frequently Asked Questions

Why do I need Ctrl+F9 instead of typing braces?

Word requires actual field braces for field codes. On Windows, press Ctrl+F9 for the outer IF field and again for its nested DOCPROPERTY field.

How do I change the number of children?

Open File > Info > Properties > Advanced Properties > Custom and change the ChildrenCount property. Then select the document and press F9 to update its fields.

Will Word automatically find the children's names and dates?

No. In this example, ChildrenCount controls visibility, but the names and dates must be entered in the corresponding conditional field results.

Can I use automatic numbering for the Family Home paragraph?

The approach above uses manually typed numbers inside IF field results. Use the same conditional structure for later paragraph numbers and test each child-count scenario.