There are several ways that standard texts can be inserted into Word documents. Word, for example includes building blocks which can be used to store formatted items, and autocorrect is surprisingly flexible if you can remember the trigger sequences that would insert your items.
Some time ago a user from the legal profession (where standard texts are in common usage) suggested that it would be handy to have a means of inserting standard texts into documents that could be readily updated should, for example, legislation change requires that wording be altered or replaced.
I set to developing a Word add-in that would do this and the result is described on this page.
The template is stored in the Word startup folder and thus loads with Word. I have included both an installer and the template separately for manual installation.
Some of my other add-ins use the registry to store data used by the add-in, but some corporate users do not make it easy to use the registry in this way, and so all the data used by the add-in is stored in the add-in template itself. This does not however include the boilerplate texts which are saved as documents.
Foremost amongst the items stored in the template is the list of boilerplate texts and their bookmarks. These are stored in a single column Word table. The add-in can employ more than one list of items and these are paged into the template as required.
In practice the modification of the table will be performed transparently to the user.
The add-in has an option to create and number the documents used for boilerplate texts, but if you find it more convenient to do so, you can save the documents without recourse to the add-in. The only provisos are that the filename must be in the format Name_bmnnnn where nnnn is a unique number. (see above illustration).
The numbers do not have to be consecutive, but they must be different from one another. The bookmark name is separated from the name with an underscore character. The underscore character must not be included in the 'Name' part of the filename.
The add-in places a group of tools on the Add-Ins tab of the ribbon. This tab is normally present only when add-ins are loaded.
The larger 'Insert Boilerplate Text' button inserts pre-prepared texts into the document.
Select an item to insert and click the 'Insert/Update Selected Text' button to place the text at the cursor position.
Items may be inserted formatted as they are stored in the boilerplate text document or as plain text, by checking or unchecking the insert box beneath the list.
As with all the add-ins from this site a disclaimer text will appear the first time this function is used, and subsequently if the Show disclaimer on startup check box remains checked, or the Reset Defaults button (see below) is clicked.
The three smaller buttons:
are described below:
This function allows a selection from (or the whole of) the current document to be saved as a boilerplate text item to the current set. The only proviso is that the bookmark number is determined by its position in the table. There is a potential for conflicting bookmark numbers to be created if being added to an existing set of numbered items that do not start at number 0001.
The function cannot be used to extract text from a template and will warn the user if that is attempted, and the document containing the texts must be saved before use:
The boilerplate text name does not include the bookmark name. That is provided automatically. You may not enter an underscore character in the dialog. Any attempt to do so will result in the underscore being replaced with a hyphen.
The item is added to the bottom of the table and takes the number of the last row of the table. When next loaded, the table will be sorted alphabetically (as in the case of the last previously added item, which has the bookmark number 0009, but which sorting places at the top of the list).
This function will remove all or selected bookmarked texts from the current document. Beware when using this function if items from more than one list have been added to the document, and those lists have similar bookmark numbers, as there is a potential in such circumstances to remove the wrong texts from the document.
The final button removes the table content and the settings that store the user preferences from the template.
Some years ago, I developed an even older Word macro for the insertion of boilerplate texts to enable documents to be combined in a single document - the results of that development can be seen elsewhere in this site.
Development has now turned full circle, and I have developed an application to store a list of boilerplate text items, and insert them in locations in the document that the application bookmarks, thus allowing previously inserted items to be updated.