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