Re: waiting for another application to finish

Tech-Archive recommends: Fix windows errors by optimizing your registry



You have two options here:
1. force Word to do foreground printing, like activedocument.PrintOut
background:=true
2. Check Background prining status in a loop and exit the loop when it
reaches zero,

while word_Application.BackgroundPrintingStatus
doevents
wend

I prefer the second method because it does not display "word is printing"
message,
but be aware that it must run from a different thread than Word itself
(as it probably is in your case) to be successful, otherwise it will never
return.

--
Please reply to NG only. This email is not monitored.
Alex.


"Bre-x" <cholotron@xxxxxxxxxxx> wrote in message
news:eWogKTIOFHA.3988@xxxxxxxxxxxxxxxxxxxxxxx
> Hi,
>
> I have a db that send some data to MS Word (invoices).
>
> On MS Word a have a macro the print the document (PDF Printer)
> then on MS Access I have a function that email the PDF file just printed
> by MS Word.
>
> Now, my problem is that MS Word has not finish printing the document and
> MS Access
> try to email the PDF as an attachment. No need to tell that an error
> occurs because there
> is not such a file.
>
> Is there a way to find out if the file has been printed?
> actually its not even MS Word fault is the dam printer that takes a while
> to print the file
>
> Regards,
>
> Bre-x
>
>
>
>
>


.



Relevant Pages

  • Re: Better report handling
    ... I need help on printing a report. ... I do a sequential search on the child file which has ... Do you have any ideas on why I can't retrieve all the associated child ...
    (comp.lang.clarion)
  • Re: Speeding up the ocnPrint() function
    ... warning if the printing exceeds 10000 points. ... of the points each time through the loop. ... How much physical memory does your workstation have? ... Who knows what the limiting mechanism is; no source code, ...
    (comp.cad.cadence)
  • Re: FizzBuzz
    ... for me to read to directly add the pretty printing into the main loop ... trivial to add pretty printing to other versions. ... 4000 constant probe ... dup 1 = if cr else space then ...
    (comp.lang.forth)
  • Re: Speeding up the ocnPrint() function
    ... warning if the printing exceeds 10000 points. ... of the points each time through the loop. ... been thinking that this is the reason for any skill list operation to ... Maybe ocnPrint uses a list ...
    (comp.cad.cadence)
  • Re: game of life
    ... > int config = s.nextInt; ... setting up a board configuration ... printing the next generation ... you initialize the increment counter within the loop, ...
    (comp.lang.java.programmer)