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.

The first time the add-in is used and subsequently controlled by a check box on the main dialog, the disclaimer form below is displayed.

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. There is even a browse button for ad hoc selections.

Documents may be inserted one after the other or may be started each to a new page. When the new page option is selected, additional options are provided

Where end notes are use in the documents, you may choose whether to have them at the ends of the inserted document or at the end of the combined document. In the case of the former, the numbers may be restarted at each document or continue in sequence throughout the combined document.

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.