Description of the error
A common error is when the document assembly engine can’t find the end of a region in the document. A region is the section of a document that begins with TableStart or IfStart and ends with TableEnd or IfEnd. Everything within these sections is considered a single ‘region’.
A couple of key rules are:
- You cannot have the start and end of a region in separate ‘sections’ of a document. In this context we are referring to the Word document section. That is, a section you create by inserting a ‘section break’ into your document.
- You also cannot have one part of a region in a Word table and the other part outside the Word table, i.e. the entire region needs to either start and end within the Word table, or contain the entire table.
- Follow our recommended naming conventions for long IF fields, and make sure each IF region has its own unique name.
For example, the following layout in a document template would result in an assembly error:
«TableStart:Qwerty_rpt»WF:DelEmptyPara
Content |
«TableEnd:Qwerty_rpt»WF:DelEmptyPara |
Fixing the error
This error will only be picked up once you try to assemble your document and will be listed in the red Assembly Error List at the top of your “assembled” document. For each instance of this error, the message will direct you to the region which is causing the problem. In particular, the error for the above layout would be: ‘The start & end merge fields for the region Qwerty_rpt are in different levels of the document’.
IfStart and IfEnd mergefields require a uniquely coupled name. Therefore, a quick search in the document for that name will find the troubled region without fail. If the region is a repeating Table section, however, there may be many regions with that same name, so some extra work will be necessary to figure out which region is causing the problem.
Once you have narrowed down the regions with a search, look to find any areas where you may have broken the above rules.
If you are having trouble searching these out, try showing the hidden formatting symbols. You can do this by clicking the pilcrow (¶) symbol in the paragraph section of Word’s Home ribbon. This will allow you to see any section breaks you may have forgotten about, and any borderless tables you may not have noticed.
Once you have found the problem, edit your document template so that you abide by the above rules. This could be as simple as moving a Start or End mergefield outside (or inside) of a table, moving a section break outside of a problem region, or replacing a section break with a page break. It all depends on the context of the error and the desired outcome for your document.
Please note that when using Long IF Fields in the header (or footer) of a document over multiple sections, linking the header to the previous section will not upset the assembly engine. However, if you remove the link to the previous header, and keep the header for the following section exactly as is, the fact that you now have two un-linked headers with the same named IF fields will cause this error. Changing the name of the region is the simplest solution in this case.
If you are still having trouble with this error, you can submit a request at the top of this page.
Comments
0 comments
Article is closed for comments.