Returns the total number of pages in the document in a RichTextEdit control.
RichTextEdit controls
rtename.PageCount ( )
Integer. Returns the number of pages in the RichTextEdit control. Returns 1 if the control contains no text and -1 if an error occurs.