Get the number of pages to print from Excel Interopb

How can I programmatically get the number of pages that a workbook or worksheet will print from Excel 2007 Interop ( Microsoft.Office.Interop.Excel )?

+1
source share
3 answers

Are you looking for ActiveSheet.PageSetup.Pages.Count?

+2
source

PageSetup.Pages.Count will give the correct answer. But how to get the right score if comments are printed at the end of the sheet.

0
source

"ActiveWindow.SelectedSheets.PrintOut From: = 1, To: = 1, Copies: = 1, Collate: = True, IgnorePrintAreas: = False"

"" "" .

-1

All Articles