Solved

how to know when word has printed a document

Posted on 2001-06-05
4
161 Views
Last Modified: 2010-04-06
 I have a program that opena word document and then prints it.

 I wish to  know when word has finished printing the document so that I can close it and open another document.

at present I get a error message whrn I try to open the next document.

0
Comment
Question by:KnucklesMT
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 6

Expert Comment

by:edey
ID: 6157756
listening

GL
Mike
0
 
LVL 4

Expert Comment

by:DMN
ID: 6157770
Try to turn off background printing in word...
0
 
LVL 2

Expert Comment

by:danysz
ID: 6158528
hi

the best way to do it is to use DDE

it have to be like that :

Application used to perform
"C:\Program Files\Microsoft Office\Office10\WINWORD.EXE" /x /n /dde

DDE Message (if the application is running)
[REM _DDE_Minimize][FileOpen("%1")][t=IsDocumentDirty()][FilePrint 0][SetDocumentDirty t][DocClose]

Application
WinWord

if DDE application is not running
[FileOpen("%1")][FilePrint 0][FileExit 2]

Topic
System

Enjoy

Daniel
0
 
LVL 17

Accepted Solution

by:
inthe earned 100 total points
ID: 6158866
can also read from the printer spooler

private
 procedure WM_SpoolerStatus(var Msg : TWMSPOOLERSTATUS); message WM_SPOOLERSTATUS;

implementation

procedure TForm1.WM_SpoolerStatus(var Msg : TWMSPOOLERSTATUS);
Begin
   label1.caption:= Format('Spooler status code is: %d',
[ msg.JobStatus ]);
   label2.caption:= Format('Jobs left in spooler: %d', [msg.JobsLeft]);
 End;
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question