If the templates have to be used both in the Word Online version and Word Win32 Client, it shall be kept in mind that the Word online version has got restrictions. This article highlights some of the restrictions when building templates with the officeatwork Designer App for Word Online and Word Win32 Client. Most of the restrictions of Word Online affect the definition of Tables in HTML,  Word Styles, Images, etc. Below are listed the restrictions and differences between the Word Online and Word Win32 Client versions and how to adjust the Placeholders, so the template is functional in both versions.Differences in functionality between Word/Word OnlinePlease check the following article to find out what feature restrictions Word Online has.Differences between using a document in the browser and in Word (microsoft.com) HTML TablesTable sizeWord Win32 Client: By default, the table size is adjusted to the content in the cells.Word Online: By default, the table is inserted in 100%.How to adjust the Placeholder, so it's functional for both Clients:Set the width of the table in each td-element.Set the height for each tr-element (This is optional as the default behavior for the height adjustment is the same in Win32  Client and Online).
row1, column1row1, column2 row2, column1row2, column2 Table border definitionWord Online: Style definitions on the table elements are ignored in Word Online.How to adjust the Placeholder, so it's functional for both Clients:Set all the border attributes in each td-element.Suggestion: Define the 'basic' table definitions as a variable at the beginning of the placeholder and use this variable to format the table.{% set tableDefinition = 'border-collapse:collapse; border:none' %}
row1, column1row1, column2 row2, column1row2, column2 Styles to format textWord Win32 Client: Styles can be applied using the class attribute: My Text .Word Online: Styles are not applied.How to adjust the Placeholder, so it's functional for both Clients:Set the format for each paragraph (font, font size, color, etc.)Suggestion: Define the 'Style' at the beginning of the placeholder:{% set tableDefinition = 'border-collapse:collapse; border:none' %}
{% set styleHeading = 'color:#001155; font-family:Arial; font-size:35px; font-weight: bold' %}
row1, column1row1, column2 row2, column1row2, column2 Image sizesWord Win32 Client: The size of images is inserted as defined in the .png fileWord Online: The size of images must be defined using the attributes 'width' and 'height'.How to adjust the Placeholder, so it's functional for both Clients:Use the 'width' and 'height' attributes to resize the picture according to the actual size.Attention: The 'width' and 'height' are defined in pixel Other Word Online restrictionsIt's not possible to change the direction of text in Word Online (Vertical text in a table cell)It's not possible to set a negative paragraph margin. If something needs to be placed at the edge of the document, the template has to be built with zero margins in the Layout.Missing support for inline Content Controls.Missing support for shapes in any Header and Footer.Word Online ignores any text boxes, especially in the header and footer, and renders them as images. So if Content Controls are placed in text boxes in the header or the footer of a document, Office.js will not return them. Hence, our Apps like the Designer or Wizard will not be able to interact with those Content Controls (Placeholders) in the same way they can do this on Word for Windows, for instance. Word Online is generally not always returning all Content Controls via the API compared to other platforms.ContentControl.insertHtml with class reference doesn't work on Word for the Web · Issue #1917 · OfficeDev/office-js (github.com)Content Control can be immutable inside of a table. This is often caused by defining a header-row in a table. This results in missing input fields in the Wizard or not updated data in the document.nunjucks's 'nl2br' filter doesn't work correctly in Word Online adding an additional space at the beginning of each line. This can be avoided using the replace function instead of the 'nl2br' filter{% set customerAddress = field('Customer Address', 'Recipient').value | replace("
", " ") %}How to fix all of thisThere is no pleasing fix as the only option (as long as Microsoft is not fixing this) is to try out different ways of designing your document, avoiding things like placing Content Controls in textboxes or tables, etc.