Solved

Query printer driver

Posted on 1997-04-13
4
375 Views
Last Modified: 2006-11-17
Is it possible to query the printer driver for a status report druing long print jobs? I.E. # of pages printed, percent of current job?  If so, how?
0
Comment
Question by:smokin
4 Comments
 

Expert Comment

by:mehoss
Comment Utility
I found this...Perhaps someone else could give an example...

Declare Function GetQueuedCompletionStatus Lib "kernel32" Alias "GetQueuedCompletionStatus" (ByVal CompletionPort As Long, lpNumberOfBytesTransferred As Long, lpCompletionKey As Long, lpOverlapped As Long, ByVal dwMilliseconds As Long) As Boolean

0
 

Author Comment

by:smokin
Comment Utility
Adjusted points to 100
0
 
LVL 1

Accepted Solution

by:
advapp earned 100 total points
Comment Utility
Yes, the Win32 API includes a GetJob function (usable from VB) that will return info on a job including these items and more:
   Total Pages
   Pages Printed
   Position
   Job Status
   Time Submitted
   User Name

However, if you've never worked with the API via VB you might need some help working this out.  If you accept this answer, I'd be willing to forward the necessary declarations and work with you on the code.

If you reject this answer, I'll assume you are not interested.

0
 
LVL 13

Expert Comment

by:Mirkwood
Comment Utility
Bought This Question.
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…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

771 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