![]() |
|
#1
|
||||
|
||||
![]()
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 http://www.vbaexpress.com/forum/show...l=1#post291194
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
vthomeschoolmom | Excel | 2 | 07-25-2013 06:17 AM |
![]() |
itsema | Word | 1 | 03-06-2013 12:48 PM |
Count number of emails from each category | HxG | Outlook | 0 | 09-19-2012 11:55 PM |
Footnotes: custome number format | btorrance | Word | 2 | 07-30-2012 10:47 AM |
![]() |
mj2000 | Word | 1 | 10-24-2011 12:43 PM |