Solved

Check Number of Pages per section

Posted on 2013-10-23
3
227 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Microsoft Word Mass E-Mail Message 10 91
Using tables with MS Word 16 68
Word / Printing 8 59
Always hangs on opening 8 66
Do you ever need to create a 20 page Word document for some testing purpose? Are you tired of copying & pasting old boring "lorem ipsum" text over and over again, increasing font size and line space in order to make the document 20+ pages long? Look…
Shortcuts in Word Just the other day I had a training for Microsoft and they wanted me to show how well the new Windows and Office behaved on a touch device, which by the way is great, but it was only then that I realized that using keyboard shortc…
This video walks the viewer through the process of creating Hyperlinks for the web and other documents. Select the "Insert" tab: Click "Hyperlink":  Type "http://" followed by a web address to reference a website or navigate to a document to ref…
This Micro Tutorial well show you how to find and replace special characters in Microsoft Word. This is similar to carriage returns to convert columns of values from Microsoft Excel into comma separated lists.

864 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

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now