Inserting MS Word files into ClauseBase documents


While ClauseBase nudges you into writing clauses that are as reusable as possible, there exist situations where you merely want to insert some static texte.g., some boilerplate terms & conditions or product descriptions that never get changed.

Similarly, while ClauseBase offers you advanced styling controls and real-time updates, ClauseBase is not a design tool. As a traditional desktop-based application, MS Word offers a smoother editing experience for layout-heavy documents.

For both scenarios, it can be useful to directly insert one or more pages, or even mere paragraphs or tables, from Microsoft Word into a ClauseBase document.

See the separate pages on Copying headers and footers from an MS Word file and Copying styles from an MS Word file if you instead want to copy styling or headers/footers from an MS Word file.


First you need to upload an MS Word file to the ClauseBase platform. You can do so by going to browse files and creating a new image / pdf / msword file, then uploading a .DOCX file and hitting the save button.

Secondly, within the ClauseBase document/binder in which you want to insert the MS Word file, you have to create a clause at the position where the MS Word file needs to be inserted.

Third, within that clause you created, you have to use either the @msword-pages or the @msword-fragment special function. The difference between the two special functions is that the @msword-pages special function always inserts the content on a separate page (using section breaks in MS Word), while the @msword-fragment function inserts the contents without any such separations.

Finally, you have to invoke the special function, using as a first parameter a #hashtag that refers to the file, and with optional subsequent parameters that refer to replacements. ClauseBase will then ask you where this #hashtag should refer to (whereby you have to select the MS Word file you uploaded earlier).

For example, @msword-fragment(#testfile, @ALPHA) would insert the contents of a certain file into the current position of the ClauseBase document, replacing the text “@ALPHA” within the MS Word file with whatever contents is assigned to the internal snippet @ALPHA.


When inserting the MS Word file, you have to the option to replace one or more parts of the MS Word file with ClauseBase contents. You do so by simply listing the snippets as the second, third, fourth, … arguments to the special function call. For example:

@msword-fragment(#testfile, @ALPHA, @BETA, @GAMMA)

|| some || table || with || four cells ||

BETA = just two words

1. A complete paragraph.
* even with a bullet

2. And a second complete paragraph.

In the code above, ClauseBase will replace @ALPHA in the MS Word file with a table, @BETA with two words, and @GAMMA with two paragraphs. (The font, location, etc. of those pieces of texts within the MS Word file is irrelevant.)

With this combination of MS Word’s static content and ClauseBase’s highly dynamic content, you can create quite powerful hybrid documents.


  • Be aware of extraneous section breaks, page breaks, etc. within your MS Word file. Particularly when you use @msword-pages (which will insert those breaks automatically) you will want to avoid double or triple breaks, as these would lead to blank pages.
  • You should be aware that when you replace contents with internal snippets in ClauseBase that consist of tables or multiple paragraphs, ClauseBase’s own styling will get inserted into the document. You probably want to use this feature sparingly, or ensure that the styles of your MS Word file and the styles you use in your ClauseBase document, roughly match.
  • The @msword-fragment and @msword-pages functions cannot be previewed as such within the browser. While ClauseBase will list the replacements within the preview screen of the browser, you will have to create a PDF-preview of the document (Ctrl-P shortcut, or Shift-clicking the “PDF” button) to see the integrated result.
Was this article helpful?
Grammar style guide
Working with the globo-panel