All Collections
Technical Documentation
Convert RTF template to a MS-Word template with HTML layout
Convert RTF template to a MS-Word template with HTML layout

How to convert the RTF template to a MS-Word template with HTML layout

Updated over a week ago

Because of the complexity of RTF templates is decided to work just with MS-Word templates with HTML layout in the future. 

Method for conversion

The easiest way to convert the RTF file to HTML format is as follows:

  1. Open the RTF file

  2. Save the RTF file as a Web Page (*.html)

  3. Open the saved file in a (plain) text editor

  4. Change the following values:
    - > by >
    - &lt; by <
    - &quot; by "
    - <meta http-equiv=Content-Type content="text/html; charset=windows-1252"> by <cx:let name="ct" value="$response" invoke="headerForKey:" arg0="content-type"><meta http-equiv="Content-Type" content="<cx:write value="$ct"/>"></cx:let>
    - <img src=
    Most of the time this does not work because this links to local files. To make this work, make sure that the location of the image is available from the web.

  5. Rename the extension to .doc

  6. Test the document


It is very important to check if the template actually works. MS-Word sometimes has the characteristic to mess up the CxScript codes. You can see this if there are any unwanted empty lines.

A solution is:

  • Remove the unwanted paragraphs

  • Don't save the page as a Web Page, but save it as a Web Page, Filtered and check if it gives the desired output.

If the output has sequences like "AAAAAAAA", than it can help to save the file again as Web Page after you've saved the page as Web Page, Filtered. Afterwards you need to rename the file to a *.doc obviously.


As concluded from the example above, converting a RTF template to HTML format is not always as simple. As guidance, the more detailed a document is, the more time converting the document will cost.

Keywords : UD-1846

Did this answer your question?