Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 10-18-2013, 04:10 PM
macropod's Avatar
macropod macropod is offline Count Number of Pages in Document with Footnotes Windows 7 32bit Count Number of Pages in Document with Footnotes Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Count Number of Pages in Document with Footnotes Display unique values and count the number of child items vthomeschoolmom Excel 2 07-25-2013 06:17 AM
Count Number of Pages in Document with Footnotes page count increases on its own -inserts white pages 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
Count Number of Pages in Document with Footnotes I don t want the footnotes to be numbered continiously in all pages mj2000 Word 1 10-24-2011 12:43 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:05 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft