Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to print a given page in Word
Message
From
18/05/2007 13:25:08
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
01226792
Message ID:
01226869
Views:
23
I get this code when I record a macro:
Application.PrintOut FileName:="", Range:=wdPrintRangeOfPages, Item:= _
        wdPrintDocumentContent, Copies:=1, Pages:="3", PageType:=wdPrintAllPages, _
         ManualDuplexPrint:=False, Collate:=True, Background:=True, PrintToFile:= _
        False, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
        PrintZoomPaperHeight:=0
I tried your code, but it still print out the whole document.

>Did you try to record the MAcro and review its VBA code?
>Anyway, try:
>
>wdPrintRangeOfPages=4
>?o.ActiveDocument.PrintOut(,,wdPrintRangeOfPages,,,,,,"3")
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform