Hi all:
I'm trying to return the # of pages in a word document. This is what I have so far:
=============================
Sub CountPages()
Dim i As Integer
i = ActiveDocument.Sections(0).Headers(wdHeaderFooterPrimary).PageNumbers.Count
MsgBox i
End Sub
==============================
It keeps returning 0. Does anyone know why, or how to get this number?
Thanks,
Ron
Ron Repp
I'm trying to return the # of pages in a word document. This is what I have so far:
=============================
Sub CountPages()
Dim i As Integer
i = ActiveDocument.Sections(0).Headers(wdHeaderFooterPrimary).PageNumbers.Count
MsgBox i
End Sub
==============================
It keeps returning 0. Does anyone know why, or how to get this number?
Thanks,
Ron
Ron Repp