Solved

How do I pause, copy and then cancel a print job before it starts printing?

Posted on 2007-11-29
3
1,223 Views
Last Modified: 2012-06-27
I am using delphi7, I have written a simple app using Mad Collection components to hook the "CreateDCW", what happens is when a person clicks print, the hook causes a form to display asking the user if they want to print in draft mode. We already setup additional printer drivers for each printer with draft at the front.
Example: Normal Printer Name = "Lexmark 2400", Draft mode setup = "Draft Lexmark 2400".
Problems:
1) How do I get the current printer name  that is going to print, each time I try something I get the default printers name instead.
2) If the printer name = "Lexmark 2400" I want to change the printer and print the document to "Draft Lexmark 2400" instead if they click on the Yes option.
3) I then need to delete the print job from "Lexmark 2400" before it starts printing, so I assume I would need to pause it, get the jobs details and then delete it.

Like I said I have got the hook working and the form displays at the correct time but now I am stuck with the printer changes.
Some code for any of the above questions would be appreciated.
0
Comment
Question by:freelancedev
3 Comments
 
LVL 17

Accepted Solution

by:
Shanmuga Sundaram earned 500 total points
Comment Utility
since I am not sure about your need, whether it is in VB or in Delphi. I just provide the link for your need. Please check whether this helps
http://www.merrioncomputing.com/Programming/PrintStatus.htm
http://support.microsoft.com/kb/202480
0
 
LVL 1

Expert Comment

by:Computer101
Comment Utility
Forced accept.

Computer101
EE Admin
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

762 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now