title: Word Interop and getting page count
body: <p>I know in VBA, within a document, I can get page count using <code>ActiveDocument.Range.Information(wdNumberOfPagesInDocument)</code>, But I can't find an equivalent of it in VB.Net using <a href="https://msdn.microsoft.com/en-us/library/microsoft.office.interop.word.aspx" rel="nofollow noreferrer"><code>Microsoft.Office.Interop.Word</code></a>.<br>
  Is there, perhaps another way I can attain the quantity of pages in a document?</p>
  
  <pre><code>Public Class Window
      'set form level declarations
      Dim appPath As String
      Dim objWordApp As New Word.Application
      Dim objDoc As Word.Document
      Dim errorPosition As String
      Private Sub Window_Load(ByVal sender As System.Object, e As System.EventArgs) Handles MyBase.Load
          objDoc = objWordApp.ActiveDocument
          With objDoc
             pages = .ActiveDocument.Range.Information(wdNumberOfPagesInDocument)
          End With
          objDoc = Nothing
       End Sub
       objWordApp = Nothing
   End Class
  </code></pre>