A questioner in a Word forum wanted a means of adding catchwords - the first word (or words) from the top of the following page - to the footer of his document, as shown in the example below. Word has no integral method of doing this - the closest it can manage is the Styleref field, but that can only reproduce information from the current page. A different method had to be found.
The solution I have produced requires that the first word(s) on each page after the first is(are) given a numbered bookmark in which the number relates to the page on which the footer will appear. i.e. the word(s) bookmarked on page 2 will be reproduced on page 1 and will have the corresponding number 1 in the bookmark name. For the sake of this exercise I chose to use the bookmark name Wordn where n is the number of the previous page.
This information is then reproduced in the footer by means of a conditional field construction (second illustration).


The following macro will bookmark the first word(s) on each page but the first of the finished document. The macro prompts for the number of words to be bookmarked (three in the above example) - the default is 1.
The 'BookmarkCatchwords' macro should not be run until all other editing of the document is completed as further editing will probably change which words are first on the pages, however running the macro again will update the bookmarks to show the correct values. I have included a macro to delete the bookmarks.
Sub BookmarkCatchwords()
'Bookmarks the first word on each page
Dim Count As Long
Dim x As Long
Dim bName As String
Dim oRng As Range
Const sNumber As Long = 3
'Set the number of words to bookmark
Selection.HomeKey Unit:=wdStory
Count = ActiveDocument.BuiltInDocumentProperties("Number of Pages")
For x = 1 To Count - 1
Selection.GoTo What:=wdGoToPage, Which:=wdGoToNext
Set oRng = Selection.Range
oRng.MoveEnd wdWord, sNumber
bName = "Word" & x
ActiveDocument.Bookmarks.Add Range:=oRng, Name:=bName
Next x
End Sub
Sub BookmarkCatchwordsDelete()
Dim oBm As Bookmark
For Each oBm In ActiveDocument.Bookmarks
If Left(oBm.Name, 4) = "Word" Then
oBm.Delete
End If
Next oBm
End Sub
You may find it simpler to manually insert the fields in the footer; however the following macro will insert the fields as shown in the second illustration at the current cursor position. Open the footer view, place the cursor and run the following macro. Toggle the display of fields with ALT+F9
Sub AddCatchwordsToFooter()
With Selection
.Fields.Add Range:=.Range, Type:=wdFieldEmpty, PreserveFormatting:=False
.TypeText Text:="IF"
.Fields.Add Range:=.Range, Type:=wdFieldEmpty, PreserveFormatting:=False
.TypeText Text:="Page"
.MoveRight Unit:=wdCharacter, Count:=2
.TypeText Text:=" < "
.Fields.Add Range:=.Range, Type:=wdFieldEmpty, PreserveFormatting:=False
.TypeText Text:="Numpages"
.MoveRight Unit:=wdCharacter, Count:=2
.TypeText Text:=" """
.Fields.Add Range:=.Range, Type:=wdFieldEmpty, PreserveFormatting:=False
.TypeText Text:="REF ""Word"
.Fields.Add Range:=.Range, Type:=wdFieldEmpty, PreserveFormatting:=False
.TypeText Text:="Page"
.MoveRight Unit:=wdCharacter, Count:=2
.TypeText Text:=""""
.MoveRight Unit:=wdCharacter, Count:=2
.TypeText Text:=" ...."""
.MoveRight Unit:=wdCharacter, Count:=2
End With
ActiveDocument.Fields.Update
End Sub
If you do not know how to employ this code, see the tutorial elsewhere on this site.
A catchword is a word placed at the foot of a handwritten or printed page that is meant to be bound along with other pages in a book. The word anticipates the first word of the following page. It was meant to help the bookbinder or printer make sure that the leaves were bound in the right order or that the pages were set up in the press in the right order.