Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Angry Customer: Printer dialog Collate Option
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00281272
Message ID:
00282652
Vues:
63
>PMFJI George, but this thread seems to touch closely on a problem I"m trying to resolve right now, so I'm hoping you can shed some light here.
>
>I'm using Word automation from VFP to print documents which require duplex (two-sided) printing. The challenge is how to turn on the printer's duplex mode automatically.
>
>When working in Word directly, I can bring up the Page Setup dialog, click the Properties command button, and mark the "print on both sides" checkbox which shows up on one of the pages of the Properties sheet. I can then print the document manually and it's fine, two-sided and all.
>
>However, when printing via VBA from VFP, it comes out as two single-sided sheets. So I'm wondering if there is a way to use the Common Dialog object to set a flag which turns on duplex mode for this printer. FWIW, I've been looking at the PRINTDLG documentation in the Platform SDK (and of course I went back and re-read Doug's FPA article as soon as I saw his post here) but so far I haven't found anything that seems to relate to the Properties sheet for specific printers. What do you think, is there a way to do this?

Hi Rick,

I've only found that to be available via the properties dialog for the particular driver. It can be invoked from the Properties button of the Common Dialogs ShowPrinter dialog or SYS(1037). Something in the API must invoke it. I'd guess it would be AdvancedDocumentProperties(). It'd be pretty tough to invoke, however, unless you used one of the three files here dealing with structures and pointers. It'd actually be easier to write a DLL to wrap it.

Programmatically, you'd have to interface with SetPrinter() (and a bunch of other API calls) to do it. You'd have to use the PRINTER_INFO_2 structure, which contains a pointer to a DEVMODE structure, which contains whether or not to print in duplex. The steps would be to call OpenPrinter(), GetPrinter() to intialize the PRINTER_INFO_2 structure, modify the duplex member of the DEVMODE structure, call SetPrinter(), the ClosePrinter().
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform