Howto get actual page count?

R

Ronnie

I use ActiveDocument->Pages->count to get the count of page in current page
but it is not acutally the count of page,
if current document contains backgroud page, then above method get the count
containing the backgroud page
so I want to know there is a way to get page count of current docment
without background page.
any help will be appreciated!


thanks,
Ronnie Ren
 
C

Christoph Dümmen

I would use a function

Public Function CountPages() As Long
Dim pge As Visio.Page
Dim lngPageCount As Long

For Each pge In ActiveDocument.Pages
If Not pge.Background Then
lngPageCount = lngPageCount + 1
End If
Next pge
CountPages = lngPageCount
End Function

Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top