Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printer Object - Paperbin

Status
Not open for further replies.

JaguarX86

Programmer
Jul 22, 2002
1
0
0
AU
I have been fighting with the printer object for the last few days - getting it to do what I want it to.

I think I have come accross a 'bug'

When attempting to change the printer paperbin property it 'sometimes' returns an error: Paperbin property read-only!

I think it could be that I may still have the spooler open - maby.
Is there a way of releasing the printer?

I have attempted to use both:
printer.paperbin = vbPRBNEnvelope

and

dim X as printer
set x = printer
x.paperbin = vbPRBNEnvelope
 
I doubt that the spooler has any effect on this situation. The Printer Object provides an interface between the VB environment and the printer driver supplied by the printer manufacturer. Not all properties work with all printer drivers.

The .paperbin property is not read only as far as the Printer Ojbect is concerned, but its possible that the print driver for the selected printer doesn't support that property and that's what is leading to this error.

My first guess on 'sometimes' returns the error is that it depends on which printer has been selected. I would guess that you have multiple printers on your system, and at least one of your printers does not support the .Paperbin property, but at least another printer does. Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 

On Win2K you need to be a power user or admin on the machine to have full control of the printers. You will need to check the permissions of the printers themselves and make sure that the login you are using has full control over the printer.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top