Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to Select Printer with Word Automation
Message
De
26/10/2001 09:41:56
 
 
À
25/10/2001 17:13:36
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00573413
Message ID:
00573613
Vues:
18
Here's an adaptation of something I found in the following KB article
HOWTO: Set the Default Window's Printer Using OLE Automation (Q193243)
oWord = CREATEOBJECT("word.application")
oDialog=oWord.Dialogs(97)
odialog.printer="New Default Printer"
odialog.execute
HTH..........Rich

>Hi, guys.
>
>I'm sure this is possible but I haven't found it yet. I've been driving Word from VFP quite successfully for a few years. I have one workstation that scans a data table looking for new mail merge letters to print. It calls Word, does the merge, and then prints the letter to a default printer.
>
>Due to a departmental move I have been asked to have more than one possible destination printer. It seems like I should be able to tell Word to change the printer before printing the letter. In MS Word 2000 I can see on the File-Print diaglog box a Printer-Name field with a drop-down list of possible printers. I've looked on page 77 of Tamar Granor's book "Microsoft Office Automation with Visual FoxPro" where she describes the oDocument.Printout method.
>
>But I don't see a parameter for printer name. I'm wondering whether a UNC name can be slipped into the cFileName (#4) parameter.
>
>Any ideas?
>
>Peter Robinson
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform