Solved

Printer.PaperBin Error

Posted on 1997-04-09
5
510 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
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.
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 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…

860 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