{{tag>category:"OpenInsight 32-Bit" author:"Simon Wilmot" author:"John Bouley"}} [[https://www.revelation.com/the-works|Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community]] ==== OLE mail merge and printing (OpenInsight 32-Bit) ==== === At 15 OCT 2009 06:51:32AM Simon Wilmot wrote: === Hi all, An urgent request if anyone can help. Using OLE do to a mail merge and go directly to the printer. If multiple documents to be printed, without a delay then documents are lost. Can anyone explain whether the OleCallMethod(WordApp, 'PRINTOUT', 1) Command loses documents if they are in a queue and if so, how to prevent that. Alternatively a way of checking that the 'queue' is clear before submitting the command. This also changes if documents are bigger or smaller as to how to sort this. TIA, Simon ---- === At 15 OCT 2009 09:02AM John Bouley wrote: === Simon, Try -] OleCallMethod(WordApp, 'PRINTOUT', 0) I believe the 1/0 indicates wether or not Word is doing background printing. Changing to a 0 will wait until the print is generated before returning. HTH, John ---- === At 15 OCT 2009 10:36AM Simon Wilmot wrote: === Hi John, Thanks for that - I'm not sure why I didn't think of that myself, just too obvious I think given what some of the symptoms were. Working fine now :o) But a warning to other users that using background printing can be a bit hit and miss when doing a multiple mail-merge Simon [[https://www.revelation.com/revweb/oecgi4p.php/O4W_HANDOFF?DESTN=O4W_RUN_FORM&INQID=WORKS_READ&SUMMARY=1&KEY=31ECC91B73D4411285257650003BA6A6|View this thread on the Works forum...]]