Excellent question from one of my clients working on a Word template for their letters, how could the word ‘continued…’ be included automatically on page one of each letter, but only if the letter was longer than a single page?
A more standard question is how to include space for the headers and footers of preprinted letterhead stationery on page 1 only. This can be done by ensuring that in the Layout section of File, Page Setup, the ‘Different first page’ option is selected. This allows you to set up empty headers and footers on page one of the right size to allow for the letterhead but, because of the ‘Different first page’ option, they will not appear on subsequent pages.
The ‘continued…’ question is not so straightforward. The headers and footers for the letterhead are required on page one, whether there is one page or many pages, but as we have said, the ‘continued…’ should only be included when a second page is needed. After a fair amount of thought, the following solution came to mind. Set up the ‘Different first page’ option as before, and this time, in the appropriate position of the header or footer insert a Word ‘IF’ field. The IF should check whether the number of pages in the document is greater than 1 and if so, include ‘continued…’, and if not omit the word.
The Word field should look something like this:
Be very careful when entering the Word field – forgetting a space or getting the syntax wrong in any other way will probably stop it working properly.
If you are not very familiar with using Word fields, the best method of inserting an IF field is probably to use the Insert, Field option in two stages.
First use Insert, Field to insert the IF field. Don’t worry about calculating the number of pages at this stage, but instead just type in a placeholder – for example the word ‘pages’:
IF pages > 1 “continued….” “”
The IF field compares two ‘expressions’ and then prints one item of text if the comparison is evaluated as ‘true’ or a different item of text if it is ‘false’.
In fact, in this case because we don’t need anything printed if the result is false we could omit the ‘FalseText’ altogether:
IF pages > 1 “continued….”
Then right click on the resulting field result, and choose Toggle Field Codes to show the underlying code. Double Click on the word ‘pages’ to select it, then go to Insert, Field again and this time use the field DocProperty, Pages:
Now select the entire field, right click, and choose Toggle Field Codes again to toggle back to displaying the result of the field.
Finally, to make sure the field result is recalculated every time the document is printed, set the ‘Update field’ option in the Tool, Options, Print screen: