Sub Test() Dim doc As Document Set doc = RecentFiles(2).Open MsgBox "Number of pages = " & doc.Pages.Count End Sub