Solved

Printer.PaperBin Error

Posted on 1997-04-09
5
518 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
[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
  • 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

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.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
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…
Suggested Courses
Course of the Month7 days, 2 hours left to enroll

622 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