Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting Windows Default printer
Message
 
 
To
21/03/2006 06:19:14
Chris Ross
Lothian Valuation Joint Board
Edinburgh, United Kingdom
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01106156
Message ID:
01106185
Views:
31
You can set printer directly in the Word session
oWord.ActivePrinter = cPrinter
You can try SetPrtProps.zip from http://www.peisch.com/downloads.html (Barbara Peisch website) to set duplex.

>
>I've got a problem with printing to a specific printer in a system I'm developing. The system runs various FoxPro reports and also uses word automation to generate letters (from word templates). The problem I have is I can set the FoxPro environment printer using the command:
>
> cPrinter = GETPRINTER( )
> SET PRINTER TO NAME (cPrinter)
>
>This works fine for my reports, though this is no good for my word automation documents as these default to the windows default printer whatever printer I setup in the FoxPro environment.
>
>I think this is probably intentional on the part of the FoxPro designers as you shouldn’t really be changing the windows default printer, but in this case I need some way to print these word documents to a specific printer selected by the user as I need to print to a duplex capable printer.
>
>Would I have to use the windows API to set a default printer - if so can anyone give me any pointers?
>
>If possible I also need to be able to change print properties before printing as I need to set the selected printer to duplex printing.
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform