Re: Printing Word document via automation
From: Patrick Spence (patrick_at_pkspence.com)
Date: 02/25/04
- Next message: Dinçer: "How to get Office version?"
- Previous message: Karen: "Re: Suppress the SQL message"
- In reply to: Patrick Spence: "Printing Word document via automation"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 25 Feb 2004 00:46:47 -0500
I fixed the problem by using the Sleep function in Kernel.32. By placing a
"sleep 1000" immediately after .PrintOut(), the documents appear to be
printing ok. 'Seems almost like a race condition was the culprit. I'll know
more after some additional testing.
"Patrick Spence" <patrick@NOSPAM.pkspence.com> wrote in message
news:%23Px497w%23DHA.1796@TK2MSFTNGP12.phx.gbl...
> When I attempt to print a Word document using automation, the document
will
> not print. I'm "talking" to Word via a DLL written in VB6. The document is
> getting saved, also being done in the DLL. What's really wierd is that if
I
> step thru the DLL code using the debugger, as soon as .PrintOut method for
> the document gets called, it prints. However, running thru the code w/o
the
> debugger, nothing happens. I've added a few DoEvents to give up some CPU
> time, but this hasn't done any good.
>
> I'm running XP Pro, Office 2000.
>
> Ideas anyone?
>
>
>
- Next message: Dinçer: "How to get Office version?"
- Previous message: Karen: "Re: Suppress the SQL message"
- In reply to: Patrick Spence: "Printing Word document via automation"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|