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--