Information générale
Catégorie:
COM/DCOM et OLE Automation
Guess I was not clear. I am fine with them printing to the default printer. I just do not know how to tell Word to print to the default printer and do not give me the Print window. When I do the Execute, I just hang in VFP. If Word is visible, I can see that Word is on the Print window waiting for OK, Cancel, etc. This happens even if i set the ActivePrinter.
gowordapp.activedocument.mailmerge.destination = 1 && to the printer
goWordApp.ActiveDocument.MailMerge.Execute
Brenda
>To set a printer, use goWordApp.ActivePrinter = "Printer name and port". Word expects the printer name and where it is, so it needs something like "HP LaserJet 4 local on LPT1:". You can get those values from the first and second columns of APRINTERS() in VFP. Unless you have a complicated network setup, you really don't need the "local on LPT1:" part for setting ActivePrinter.
>One thing to remember, no matter what your user sets the printer to in your application (maybe using SYS(1037), Word will ignore it and use the Windows default printer unless explicitely told otherwise via ActivePrinter.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement