Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Page Number Problem
Message
 
To
08/05/2003 14:38:14
Jim Rieck
Quicken Loans/Rock Financial/Title Sourc
Livonia, Michigan, United States
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00786416
Message ID:
00786823
Views:
32
This message has been marked as the solution to the initial question of the thread.
AFAIK if header/footer contains 'page X of Y' expression created manually from Word, then number of pages Y may not displayed correctly in the Page Layout View. However it is displayed correctly in the Print Preview.

You can get the actual page number using:
?oWord.Activedocument.ComputeStatistics(2)
and replace header/footer as needed or as soon as you add pages to the word document in the code.

>All,
>
> I have an application that opens a word document and fills in some fields. The users can either preview the document with Word, or Print the document which prints the document using Word automation. When the user selects the print option the page numbers in the footer say X of 12 and there are only 9 pages, not 12. Has anyone come across this before or know how to fix it? The code I use for printing is below
>
>
>PROCEDURE PrintWordDoc
>    LPARAMETERS oWord
>    LOCAL lBackground
>    WITH OWord
>       lBackGround = .Options.PrintBackground()
>       IF lBackGround
>	   .Options.PrintBackGround = .F.
>       ENDIF
>       .Wordbasic.FilePrintDefault
>       IF lBackGround
>   	  .Options.Printbackground = !.Options.PrintBackGround
>       ENDIF
>    ENDWITH
>
Previous
Reply
Map
View

Click here to load this message in the networking platform