The following macro will write the page number(s) of each occurrence of the
searched text to a new document.
Dim oDoc, oNewdoc As Document
Dim sText, sPage As String
sText = InputBox("Enter text to find")
Set oDoc = ActiveDocument
Set oNewdoc = Documents.Add
oNewdoc.Range.Text = "'" & sText & "' found on page(s) "
oDoc.Activate
Selection.HomeKey wdStory
Selection.Find.ClearFormatting
With Selection.Find
Do While .Execute(findText:=sText) = True
oNewdoc.Range.InsertAfter _
Selection.Information(wdActiveEndPageNumber) & ", "
Loop
End With
oNewdoc.Activate
http://www.gmayor.com/installing_macro.htm
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site
www.gmayor.com
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>