View Single Post
 
Old 10-18-2013, 04:10 PM
macropod's Avatar
macropod macropod is offline Windows 7 32bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,343
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Finding which pages contain footnote references is easy enough, but finding pages where the footnote from a previous page has overflowed onto it is more problematic.

For the former, try:
Code:
Sub FindFootnotePages()
Dim i As Long, Rng As Range, j As Long, k As Long, StrPages As String
With ActiveDocument
  If .ComputeStatistics(wdStatisticPages) > .Footnotes.Count Then
    For i = 1 To .Footnotes.Count
      If .Footnotes(i).Range.Information(wdActiveEndPageNumber) > k Then
        k = .Footnotes(i).Range.Information(wdActiveEndPageNumber)
        j = j + 1
        StrPages = StrPages & k & " "
      End If
    Next
  Else
    For i = 1 To .ComputeStatistics(wdStatisticPages)
      Set Rng = ActiveDocument.GoTo(What:=wdGoToPage, Name:=i)
      Set Rng = Rng.GoTo(What:=wdGoToBookmark, Name:="\page")
      If Rng.Footnotes.Count > 0 Then
        j = j + 1
        StrPages = StrPages & i & " "
      End If
    Next
  End If
  If j <> 0 Then
    StrPages = " references, on pages: " & vbCr & Replace(Trim(StrPages), " ", ", ") & "."
  Else
    StrPages = "s."
  End If
  MsgBox "The document: " & .Name & " contains " & j & " footnote" & StrPages
End With
Set Rng = Nothing
End Sub
For some code to get you started with the latter, see:
http://www.vbaexpress.com/forum/show...l=1#post291194
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote