Solved

Printer Online/Offline

Posted on 2004-04-15
6
411 Views
Last Modified: 2006-11-17
Through my VB application I wants to test that printer is online/offline
before printing the report.
Could anyone please let me know how to test it?


0
Comment
Question by:rajesh_agr
[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
  • 2
6 Comments
 
LVL 4

Expert Comment

by:Dangeriz
ID: 10831383
How are you printing the report?
Are you using the Printer object?
0
 
LVL 4

Expert Comment

by:Dangeriz
ID: 10831619
if you are using the Print object in VB then there ISN'T a method you can use which allows you check for printer online/offline status. It will just take send print commands to the default printer on that machine.

All you have to do to accommodate this is to use proper error handling...

Private Sub Command1_Click()
   
On Error GoTo ErrorHandler   ' Set up error handler.
   
   Printer.Print "Testing printer connectivity"   ' Send Print command.
   Printer.EndDoc
   
   Exit Sub
   
ErrorHandler:
   MsgBox "There was a problem printing to your printer." & vbCrLf & _
            "Please check your your printer connectivity."
   Exit Sub
End Sub
0
 
LVL 17

Accepted Solution

by:
zzzzzooc earned 50 total points
ID: 10848733
"Getting the status of the selected printer from Visual Basic"

http://www.merrioncomputing.com/Programming/PrintStatus.htm
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

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

724 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