Solved

Printer.PaperBin Error

Posted on 1997-04-09
5
507 Views
Last Modified: 2012-08-13
I am using VB4/32 Enterprise EditionWhy can't I set Printer.PaperBin at runtime? Acording to HELP I can, but every time I try I get an error "Run-time Error 380 - Invalid Property Value". I have tried a couple of printers and all possible PaperBin settings.Please Help - its becoming urgent!!I have a project with one form, which is the startup form.Nothing is on the form!In Form_Load I have the following code:MsgBox(Printer.PaperBin) 'gives result of 11Printer.PaperBin = 11    'get the errorThat's all there is to it. Nothing Fancy
0
Comment
Question by:rbroome
  • 3
5 Comments
 
LVL 1

Expert Comment

by:PC-Alex
ID: 1425185
Could you give us the code lines, together with the Dim -
statements belonging to the code ?
0
 

Author Comment

by:rbroome
ID: 1425186
Edited text of question
0
 

Author Comment

by:rbroome
ID: 1425187
Edited text of question
0
 

Accepted Solution

by:
skizz earned 100 total points
ID: 1425188
This is a serious bug in VB4 32, which also occurs in VB5. There is no workaround except to go direct to the API.

Printer.Paperbin will always work in VB416, even half way through a print job. Printer.Paperbin will never work in VB432. Printer.Orientation will still work in VB432.

In VB5, the first call to change the Paperbin or Orientation will work. No calls will work after a newpage, or any printing to the first page.

We (my colleagues at work) have registered this bug with MS. They have confirmed that it is indeed a bug. They have not yet replied with a date for a fix. (It was registered by us the day after the release of VB5).

Code sample:

'This call works in VB416, and VB5, but not VB432
'VB432 gives Invalid Property Value
Printer.Paperbin = vbPRBNUpper
Printer. Print "Test1"

Printer.Newpage

'This call works in VB416,but not VB432 or VB5
'VB432 gives Invalid Property Value
'VB5 gives Property may not be changed in the middle of a page
Printer.Paperbin = vbPRBNLower
Printer.Print "Test2"
Printer.Enddoc

0
 

Author Comment

by:rbroome
ID: 1425189
Thanks for confirming it as a bug. I have also reported it to Microsoft (Australia). As yet they haven't officially acknowledged it.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
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…

948 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

23 Experts available now in Live!

Get 1:1 Help Now