A few days ago during a training I wanted to show how to edit a Word layout. On the Report Layouts page, I selected a standard Word layout for Standard Sales – Invoice (report 1306) and chose Edit Layout. Business Central showed this error before Word opened:
Errors were detected in the Word layout:
UnsupportedExternalContentFields: The Word layout contains unsupported fields or external references: ExternalRelationship:attachedTemplate. Remove them and try again.

One of the participants then pointed me to the workaround and to BCApps pull request #14426. I reproduced the error in Business Central 29 and 29.1. In both versions, ExternalRelationship:attachedTemplate was the clue that led to Word’s document template settings.
Check the document template in Word
In both layouts I inspected, the Document template field pointed to a .dotx file on someone else’s Desktop. Word stores that path inside the .docx. It can survive every copy of the layout, even long after the original template has disappeared.

If you open the .docx as a ZIP archive, you can see exactly what Business Central is referring to. The w:attachedTemplate element in word/settings.xml points to a relationship in word/_rels/settings.xml.rels. The relationship has TargetMode="External" and carries the old Desktop path. This is how Word stores a reference to an attached document template.
Export the layout and remove the template reference
- On the Report Layouts page, select the affected layout and choose Export Layout.
- Open the downloaded
.docxin desktop Word for Windows. On the Developer tab, choose Document Template. If you don’t see the tab, enable it under File > Options > Customize Ribbon. - In Templates and Add-ins, clear the old path from the Document template field, choose OK, and save the file.
- Back on Report Layouts, choose New and import the saved document as a user-defined Word layout for the same report. Try Edit Layout again and use Run Report to check the output. When you’re ready to make the new layout available on the report request page, set its status to Approved.
I also posted about this issue in the Business Central partner community on Viva Engage.
I would have expected Microsoft to try Edit Layout on its own standard Word layouts before releasing it, and maybe checking those layouts for external template references is something BCQuality could help with. 😉
Related links
- Related BCApps pull request #14426
- Viva Engage: BC 29, 29.1: Word layout error(s) & fix Posted in BC Partners | Application Functionality
Discover more from think about IT
Subscribe to get the latest posts sent to your email.
