I've got to produce a quite a few documents (perhaps 16 or so). The documents share a number standard sections. For example, each document will have a common Introduction, and each will include a section on Security Architecture and Threat Models.

I planned on putting those shared sections in separate Word documents, and then combining or merging the Word documents à la carte to produce a larger document.

I know DocBook, and I know how to combine separate books/sections into a larger book. In this scenario, I would have a separate XML file for each topic, and then include them in the various books. DocBook will handle the Table of Contents, Section Headers, Index, etc.

How do I combine or merge multiple Word docs into a single larger doc? I'm especially interested in a way to do it from the command line so I don't have to fight with UI's.

What software is used to do this on the Windows platform?

  • 2
    I've not tried that, but maybe Master documents (a feature of MS Word itself) might come in handy here?
    – Izzy
    Commented Oct 26, 2014 at 14:09
  • 1
    @Izzy: a) the link is broken. This one was helpful. b) Those documents seem to corrupt easily and you need to know the 10 rules of creating a master document, which is a pity Commented Jan 16, 2016 at 22:52
  • @ThomasWeller thanks! Link fixed. I cannot speak for MS (living in a MS-free zone); I'm using the corresponding feature in LibreOffice :)
    – Izzy
    Commented Jan 16, 2016 at 22:58

2 Answers 2


The DITA standard was created to solve exactly this problem.

You can create documentation fragments, and then combine them together to create full books.

It is very useful when the same chapter is used in several documentations (for instance a chapter about Threat Models is included in the documentation of several products).

It is also very convenient when producing several manuals that are slightly different, for instance for several customized versions of the same software.

DITA being a standard, there are many tools that implement it. I would recommend Componize, which also provides document management.

An implementation of the standard: DITA Open Toolkit

DITA Open Toolkit is an open source implementation of the DITA toolchain.

It is written in Java and runs on Windows/Mac/Linux.

User guide: http://www.dita-ot.org/2.1/user-guide/transforming-dita-content.html

The parts themselves must be written in Docbook or in the DITA-specified XML, at your choice. Both formats have some WYSIWYG editors available.


I would suggest writing your section as DocBooks and then use pandoc to combine & convert to docx for MS-Word.

  • Free.
  • Cross Platform.
  • You don't have to have MS-Word on your machine for it to work.
  • Command Line or batch file works fine.

You might wish to use an intermediate format during the processing so as to add ToC tags etc.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.