views:

17

answers:

1

How can I programatically retrieve the number of pages a workbook or worksheet will print to from the Excel 2007 Interop (Microsoft.Office.Interop.Excel)?

+1  A: 

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

shahkalpesh
@shahkalpesh ActiveSheet is of type object, what do I need to cast it to?
C. Ross
shahkalpesh