How to programmatically determine actual page count in Excel 2003?

G

GopherDude

I need a way to determine the actual number of printed pages for a worksheet.
If you place Excel into "Page Break Preview" view and expand the view area,
you will see sections titled "Page 1", "Page 2", "Page 3", "Page 4", etc
depending on the number of horizontal and vertical page breaks. Excel has an
"IntelliPrint" feaure that only prints non-blank pages thus if I put data in
a cell on Page 1, 2, and 3 and print preview the sheet, the page count is 3.
However, if I use Microsoft's recommended way of determining page count,
ExecuteExcel4Macro("GET.DOCUMENT(50)") the returned page count is 4 (I'm
assuming it is using the (hpagebreak.count+1)*(vpagebreak.count+1) method you
see in various posts). Does anyone know how to determine the actual printed
page count?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top