Home Search

DriveWorks Pro 21
Merge Multiple Word Documents Into A Parent Document

Send Feedback

Merge Multiple Word Documents Into A Parent Document

This Specification Macro Task merges a set of Word documents into another Word document. Its main use is to create a multi-line Word quotation.

Please ensure that Microsoft Office is installed on all DriveWorks machines that will process this Task.


Property NameDescription
Target File NameFile Name of the target parent document.
Files to insertPipe-bar (|) delimited list of files to insert, in the order they are required to be inserted - Must include full file paths, or paths relative to the parent file.
Insertion Paragraph NumberThe paragraph number that will be replaced with the imported files.
GapNumber of blanks lines between inserted files
Show WordWord Application will be visible if set to True
Extension for Saving FilePipe-bar (|) delimited list of extensions to save the file as (e.g. .pdf|.xps|.txt).

Paragraphs in Word Documents are counted as each body of text or line space. To work out where to insert your files simply count the number of line spaces and bodies of text until you are at the desired location.


When this Task is added the properties are static. To be able to build rules on a static property see How To: Change A Static Property To A Dynamic Property.

Property NameExample RuleExample ResultMeaning
Target File NameDWSpecificationFullPath&"\Quote.docx"C:\Main\MyDocuments\Specifications\Parent 121\Quote.docxThis is the Full File Path of the target parent document in which the other Word Documents will be merged.
Files To InsertDWSpecificationFullPath&"\Image.docx|" &DWSpecificationFullPath&"\Image.docx"C:\Main\MyDocuments\Specifications\Child 122\Image.docx|C:\Main\MyDocuments\Specifications\Child 123\Image.docxThis is the Full File Paths of the files to insert in a pipebar (|) delimited list in the order in which they will be inserted in the target Parent.
Insertion Paragraph Number55This is the paragraph number that will be replaced with the files to insert.
Gap11This is the number of blank lines between the inserted files.
Show WordTRUETRUETRUE will show the application when the Specification is running. FALSE would not.
Extension For Saving File".PDF".PDFThis will save the created file as a PDF.

Status Outputs

This task supports Status Outputs. These can be used to perform different actions depending on what the status outcome of the task is. For more information see Status Outputs in the Task Node Outputs section of Specification Macros Task Node.

The status output navigation is as follows:


  • Documents successfully merged into parent Word document

Success with Warnings

  • N/A - Should never be fulfilled

Failed (one of the following occurred)

  • No insertion files have been specified
  • Target file name is empty
  • Target file does not exist or could not be accessed
  • Target file is read-only. Cannot insert images into read-only documents
  • Unknown error occurred