Skip to main content
Conga Support

Stack Empty (Release 7)

Cause

 When you receive a 'Stack Empty' error message when merging a Word Template, it usually means that there are detail region tags (TableStart/End) placed within nested IF statements.

IF fields in Word display content conditionally. If some of these detail region tags are shown incorrectly on a conditional basis, it can result in mismatched TableStart/End detail regions due to the conditional formatting. This can result in the "Stack Empty" error.

What to do

The best solution to this issue is to adjust your detail region tags so that they're not embedded within IF statements, or if they must be, ensure that each one will have a corresponding Start/End position.

If the above solution does not fix the issue, you may want to check your footers and headers for possible errors, as this can also cause the "Stack empty" error. To troubleshoot headers and footers, save a new copy of your template and then remove one header or footer at a time, doing a test merge operation using the local template each time. Once you can run the merge operation without an error, you should be able to narrow down which header or footer section is causing the issue.