View Single Post
 
Old 11-11-2013, 11:02 AM
d4okeefe d4okeefe is offline Windows Vista Office 2007
Advanced Beginner
 
Join Date: Apr 2013
Posts: 77
d4okeefe is on a distinguished road
Default A solution

Here is the solution I came to. All of the documents I analyze use separators when producing footnotes. The macro checks each page for separator stories and adds the result. Thanks again for your help.

Code:
  Dim aPage As Page
  Dim j As Long, k As Long, l As Long, m As Long, x As Long, y As Long
  j = ActiveDocument.ComputeStatistics(wdStatisticPages) 'Total Page Count
  k = 0 'keeps track of current page being analyzed
  l = 0 'counts Separator Story
  m = 0 'counts Continuation Separator Story
  For Each aPage In ActiveDocument.ActiveWindow.ActivePane.Pages
    k = k + 1
    x = aPage.Rectangles.count 'counts Rectangles on each Page
    For y = 1 To x 'cycles through Rectangles on each Page
      If aPage.Rectangles.Item(y).RectangleType = wdTextRectangle Then
        If aPage.Rectangles.Item(y).Range.StoryType = wdFootnoteSeparatorStory Then
          l = l + 1
        End If
        If aPage.Rectangles.Item(y).Range.StoryType = wdFootnoteContinuationSeparatorStory Then
          m = m + 1
        End If
      End If
    Next
  Next
  Debug.Print l + m
Reply With Quote