| 
       | 
        
       | Object Model Reference : Classes : P : Pages : Properties : Pages.Count  | 
      
Property Count As Long
Member of Pages
The Count property returns the number of pages in a document.
The Count property returns a read-only value.
The following VBA example returns a message if the document contains only one page.
Sub Test()  | 
 Dim ret As VbMsgBoxResult  | 
 If ActiveDocument.Pages.Count = 1 Then  | 
  ret = MsgBox("Document contains only 1 page. Do you want to continue?", vbYesNo)  | 
  If ret = vbNo Then Exit Sub  | 
 End If  | 
End Sub  | 
| 
       | 
        
       | 
		      
		          
		             | 
      
Copyright 2013 Corel Corporation. All rights reserved.