Graham Mayor

... helping to ease the lives of Microsoft Word users.

Many people access the material from this web site daily. Most just take what they want and run. That's OK, provided they are not selling on the material as their own; however if your productivity gains from the material you have used, a donation from the money you have saved would help to ensure the continued availability of this resource. Click the appropriate button above to access PayPal.

Insert a batch of files into a Word document

Boiler is a template add-in for Microsoft Word, originally conceived by Woody Leonard (with several modifications of my own) to include boilerplate text(s) into Word. It can be used to insert pre-prepared texts at the cursor - in much the same way that you would use autotext, autocorrect or includetext, or you can use it to combine a number of documents into one e.g. the separate chapters of a book.

The documents can be selected from different folders (or in the case of the Word 2007-2016 version from file lists stored in Excel worksheets), and the dialog will display Word compatible document files from those folders.

The zip file includes versions of the add-in for Word 97-2000, 2002-2003 and 2007-2016. The 2002-3 and 2007-16 versions also include an EXE format installer, which will place the appropriate template in the default Word startup folder. If you have changed the location of the startup folder from the install default, change the path to the new location from the installer dialog.

Word will attempt to load any file located in either location on start-up.

The folder location for the Word startup folder will vary with operating system and/or user. If you don't know the location on your machine, check Word > Tools > Options > File Locations.

If you have not changed the default location of the Word Startup folder, it can be located (in English language versions of Windows) by typing %appdata%\Microsoft\Word\STARTUP in the address bar of Windows File Explorer.

The installer when run will produce the following dialogs:

When correctly installed the add-in will be loaded with Word and will appear in the templates dialog. In Word up to 2003 this is located via Tools > Templates and add-ins. In Word 2007 and 2010 the Templates button is on the Developer tab of the ribbon. The dialogs for all Word versions are similar.

In the 2000 and 2002-3 versions, the add-in provides a Custom toolbar called 'Insert Files' which should be displayed by default, but if it isn’t select View > Toolbars and check the 'Insert Files' entry.

In Word 2007 and later, the Insert Documents command can be found in the Boiler group on the Insert Documents tab of the ribbon.

Note that the illustrations below are from the Word 2007-2016 version. The earlier Word version add-ins do not have the full range of options that this version features, in particular the Excel option and the multiple file locations, but the principle is otherwise much the same.

Clicking the Insert Documents button in the 2007 - 2016 version from the first time produces the following configuration dialog. From that dialog you can select as many or as few folders as you wish for ease of recall later. The main dialog offers buttons for up to 16 folders. Each selected folder must be given a descriptive text, and the function is error trapped for missing texts. You may also select an Excel file containing a list of files, but more of that later.

Each of the folder buttons displays a dialog similar to that shown below from which you may select the file folder. The above dialog may be recalled at using the Config Folders button on the ribbon.

The Reset button clears all the entries and returns to first use conditions.

In the Word 97/2000 version there is no Excel option and the following dialog is used instead.

Select the folder that contains the documents you wish to include and click ‘Open’ or ‘OK’ according to version.

This causes the following dialog box to be displayed (the Word 97-2000 version does not have all the options shown below).

The above dialog will appear each time the utility is run, however it can be hidden by clicking the check box at the bottom of the next screen

The main dialog looks complicated (more complex than earlier versions) but the buttons are self evident and there is built-in context sensitive help available by clicking one or other of the blue question mark icons.

The folder and Excel buttons may all be configured from this dialog either by clicking an 'Unused' button or by selecting a used button and clicking the 'remove folder allocation' button which will make it unused and available to be re-assigned.

Excel workbooks for use with this function must have the default worksheet name 'Sheet1'. The first column must have a header in row 1 the document names in column 1 and their paths in column 2

The dialog only displays the filenames.

Inappropriate worksheet formats are trapped and an error message will be displayed.

Because of the way Word formats documents, the function works best when all the inserted documents are based on the same template. There will inevitably be some formatting issues if the inserted documents use the same style names to produce different layouts.

To help minimise some of the issues that may occur, check the 'Insert each document on a new page' check box when inserting batches of documents. This inserts a new page section break between each document. Selecting this option provides two further options to enable that new page section break to be an odd or even page break.

It is not the perfect solution, but it is as good as you are likely to get when working with disparate document types.

- Click here to download the add-in




Whilst preparing the 'Print a batch of files' page which draws much from the 'boiler' add-in that has been a downloadable file from this site for several years, I realised that I had not created a separate page referring to that add-in.

The downloadable file did include comprehensive description of the add-in and its use, but the reasons why I did not prepare a page to accompany it are lost in the mists of time. This page now corrects that omission.