Word view

Word view can generate diverse sort of MS Word documents containing tables, images, or any other components.

To create a Word view, you have to provide a valid MS Word template:

Document generation is based on context data (Field System names) which is mapped to the structures defined in the template (e.g. "{item.price}").

When you have the template ready, the next step is to launch generation and get the resulting document. There are two ways for this.

The first one is simpler and needs adding a button with "Download Word doc" server action.

However, the generation is straightforward with this approach, and you do not have any configuration options. The button will start generation with the default MS Word view, and the output filename will be based on the template filename. If you need to control these options on your own, then you may consider the second approach.

The other way is to create a custom action block and calling generateDocViewWithTemplate(options) function.