property ExPrint.PagesCount as Long
Returns the number of pages.

TypeDescription
Long A long expression that specifies the number of pages being loaded.
The PagesCount property specifies the number of pages being displayed. The number of loaded pages is also displayed in the right part of the preview's status bar as "Page: 1/8". The PageRange property specifies the pages, or the range of pages being printed. A page being not printed shows disabled in the print preview. The object being printed determines the number of paged being loaded.