Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Apr 2002
    Posts
    51
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Incorrect page count in Word (VBA/Office 2000)

    I know that this has been discussed before, but I haven't been able to find a solution.
    The problem is when I try to retrieve the page count in a Word document, this value sometimes is incorrect

    I've tried with these functions:

    Dim oDoc As Word.Document
    ...
    oDoc.ComputeStatistics(wdStatisticPages);

    OR

    Using BuiltInDocumentProperties and using wdPropertyPages

    Do you guys know why is this or if there a walkaround to get the exact page count?

    Thanks

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Incorrect page count in Word (VBA/Office 2000)

    Does it help if you oDoc.Repaginate before checking the number of pages?

  3. #3
    Star Lounger
    Join Date
    Apr 2002
    Posts
    51
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Incorrect page count in Word (VBA/Office 2000)

    It works like a charm! Thanks, jscher2000

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •