Click to See Complete Forum and Search --> : Check printer Status


Paul Summerfield
10-23-2003, 02:57 PM
Is there a way to check the print status , I know I can check to see if it
is Online or off line , but I need a way to see when all the letters are
spooled and the printer has started. As I use word as my mail merge and sometime
it generates over 1000 letters so I need to stop word from closing until
all letters have been spooled.

Many thanks

Paul

Tamar E. Granor
10-23-2003, 02:57 PM
On 13 Oct 2003 06:15:11 -0400, "Paul Summerfield"
<foxy@quantumistic.co.uk> wrote:

>
>Is there a way to check the print status , I know I can check to see if it
>is Online or off line , but I need a way to see when all the letters are
>spooled and the printer has started. As I use word as my mail merge and sometime
>it generates over 1000 letters so I need to stop word from closing until
>all letters have been spooled.
>

First, keep in mind that from VFP, you can't even directly check
whether the printer is online or not. Those functions are meaningless
in VFP; they date back to DOS, where they actually did something. So
you'd have to go through the Windows API.

What you're looking for, though, is something else. I think the
easiest way to do what you want is to pass .F. for the Background
parameter of Word's PrintOut method. Then control won't return until
everything is spooled.

Tamar

Paul Summerfield
10-23-2003, 02:57 PM
Sorry but am only just getting started with Automation with Office, where
and what code would I use?

I have ....

alt2CreateDataSource WITH oDocument, DBF("addresslist"), ADDBS(SYS(2023))+(lcheadername)
oDocument.MailMerge.Execute()
oMergedDocument = oWord.ActiveDocument
.Printout()

Many thanks

Paul



Tamar E. Granor <> wrote:
>On 13 Oct 2003 06:15:11 -0400, "Paul Summerfield"
><foxy@quantumistic.co.uk> wrote:
>
>>
>>Is there a way to check the print status , I know I can check to see if
it
>>is Online or off line , but I need a way to see when all the letters are
>>spooled and the printer has started. As I use word as my mail merge and
sometime
>>it generates over 1000 letters so I need to stop word from closing until
>>all letters have been spooled.
>>
>
>First, keep in mind that from VFP, you can't even directly check
>whether the printer is online or not. Those functions are meaningless
>in VFP; they date back to DOS, where they actually did something. So
>you'd have to go through the Windows API.
>
>What you're looking for, though, is something else. I think the
>easiest way to do what you want is to pass .F. for the Background
>parameter of Word's PrintOut method. Then control won't return until
>everything is spooled.
>
>Tamar

Tamar E. Granor
10-23-2003, 02:57 PM
On 13 Oct 2003 11:15:27 -0400, "Paul Summerfield"
<foxy@quantumistic.co.uk> wrote:

>
>Sorry but am only just getting started with Automation with Office, where
>and what code would I use?
>
>I have ....
>
>alt2CreateDataSource WITH oDocument, DBF("addresslist"), ADDBS(SYS(2023))+(lcheadername)
>oDocument.MailMerge.Execute()
>oMergedDocument = oWord.ActiveDocument
>Printout()
>

Pass .F. as the first parameter to Printout:

oMergedDocument.Printout( .F. )

Tamar