General information
Category:
COM/DCOM and 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.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only