Getting Missing END IF or Missing END REPEAT Errors
Problem
When I test assemble my template, I get a Missing END IF (or a Missing END REPEAT) error. I have a lot of different instructions in my template—how can I determine where the END instruction is missing?
Solution
The HotDocs Outliner can help you quickly locate the opening IF instruction that isn't paired with a closing instruction.
To use the HotDocs Outliner
- At the template, click the drop-down menu below the
HotDocs button, then select the
HotDocs Outliner button. HotDocs displays an error message saying an END instruction is missing. (This is correct.)
- Click on this warning and click Go to Error in Template. HotDocs highlights the opening instruction.
- Determine where the closing instruction should appear and merge it in the template. (You can manually create the END field, or you can copy an existing field and replace the text between the chevrons with the appropriate END instruction.)
HotDocs Outliner is supported in only Microsoft Word 2000 and later.
Two other tools can help you match opening instructions with their closing instructions. These are the Match Fields tool and the
Label Fields tool. See Match Opening Instructions with Closing Instructions and Use Labels to Identify Instructions for details.
The only time an END instruction should not be used is when inserting a REPEAT instruction in a table. See Use a Word Processor Table to Display a List for details. In all other cases, every IF and REPEAT instruction must have a corresponding END instruction.