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
Solved

how to know when word has printed a document

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
FMX StringGrid1->Canvas->FillRect Problem 3 170
find a node in VST 2 70
how to resize animated Gif image in delphi ? 1 35
update joined tables 2 55
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

840 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