Solved

how to know when word has printed a document

Posted on 2001-06-05
4
158 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
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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

810 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