Solved

Check Number of Pages per section

Posted on 2013-10-23
3
230 Views
Last Modified: 2013-10-23
Hi,
I need to check which sections have more than 1 page... (vba solution is ok...)
I am using Word 2010...
0
Comment
Question by:nonlinearly
  • 2
3 Comments
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 39593921
You could put  SectionPages field in the header. If the headers are are linked, the field will be in all headers.
0
 

Author Comment

by:nonlinearly
ID: 39594041
I prefer a solution with VBA because I have to check 80 files one-by-one and each file has more than 3.000 or 5.000 pages... so it will not obvious which sections will have more than 1 page
thank
0
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 500 total points
ID: 39595552
OK. How about this?
Sub ReportSectionPageCount()
    Dim sec As Section
    Dim iPageNumber As Integer
    Dim iPrevNumber As Integer
    For Each sec In ActiveDocument.Sections
        iPageNumber = sec.Range.Information(wdActiveEndPageNumber)
        MsgBox "Number of pages in section " & sec.index & " = " & iPageNumber - iPrevNumber
        iPrevNumber = iPageNumber
    Next sec
End Sub

Open in new window

0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction Authors who set out to write any sort of lengthy piece for online submission—be it a long question or comment on a technical form, an article, or a substantial blog entry—often find it useful to work up a draft in an editor other t…
Using Word 2013, I was experiencing some incredible lag when typing.  Here's what worked for me....
This video shows the viewer how to set up and create Footnotes in their document. Click on the References tab: Select "Insert Footnote": Type in desired text:
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question