Results 1 to 3 of 3

Thread: Printer Properties -- Read Only??

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 1999
    Location
    Chapel Hill, NC, USA
    Posts
    7

    Question

    Hi -- I am working on a VB program that prints out a form. Before the print, I want to change the "PaperBin" property of the printer. I only have one printer set up (it's a network printer set as the default), but I explicitly set it in my code anyway, and have a message box showing that it's really the correct printer. Yet, when I try to change the PaperBin property, I get error "383 -- property read only."
    Any ideas?
    Thanks!

    Here's the snippet of my code:
    Dim CheckPrinter As Printer
    Set CheckPrinter = Printers(0)
    MsgBox "CheckPrinter(0) = " & CheckPrinter.DeviceName
    CheckPrinter.PaperBin = vbPRBNMiddle




  2. #2

    Thread Starter
    New Member
    Join Date
    Feb 1999
    Location
    Chapel Hill, NC, USA
    Posts
    7

    Unhappy

    I've received some advice on other message boards, but it's still getting me nowhere. One post said not to use the Set statement for the printer, but MSDN says that I must use that in order to have write-access. In any case, if I try this:
    Printers(0).PaperBin = 7
    I still get the "383 -- read-only" error.

    Another post said that I might need a new printer driver. I'm a little nervous about doing this -- I don't want to mess up other printing.

    Does anyone have any more ideas?
    Thanks

  3. #3

    Thread Starter
    New Member
    Join Date
    Feb 1999
    Location
    Chapel Hill, NC, USA
    Posts
    7
    Someone on the NoWonder message board helped me figure it out -- I should have been saying:
    Set Printer = Printers(0)
    Printer.PaperBin = vbPRBNAuto
    instead of declaring "CheckPrinter" & setting it to "Printers(0)."

    That part's working now, but when my code finishes setting the printer properties & tries to print the form, I get this error:
    "486 -- can't print form image to this type of printer".
    I get this error even if I set the Paperbin property to the default (if I don't set it to anything, the form prints fine).
    Here is my code -- any more ideas?
    Thanks!

    Set Printer = Printers(0)
    Printer.PaperBin = vbPRBNAuto ' default
    Me.PrintForm
    Unload Me

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width