Results 1 to 3 of 3
  1. #1
    Lounger
    Join Date
    Aug 2002
    Location
    Boise, Idaho, USA
    Posts
    38
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Printer Properties in VBA/XL2000 (VBA/XL2000)

    Does anyone have any ideas how to access printer-specific settings via VBA? Specifically, I'd like to be able to tell our remote printer (HP Inkjet CP1700) to look for its xlPaperTabloid paper in Tray 2 for certain print jobs. Users are forgetting to do it manually for certain automated outputs, and the print queue stalls, 'cuz the printer thinks it's out of paper. The macro recorder and Object Browser aren't offering me any inspiration. As a (temporary?) fix, I'm putting in a MsgBox to remind my users, but it would be more elegant if I could get the computer to do the work! Thanks.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Printer Properties in VBA/XL2000 (VBA/XL2000)

    You would either need to use Windows API calls, which is fairly complicated, or SendKeys. See XL2000: How to Change the Paper Source Using the SendKeys Command for instructions on the latter.

  3. #3
    Lounger
    Join Date
    Aug 2002
    Location
    Boise, Idaho, USA
    Posts
    38
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Printer Properties in VBA/XL2000 (VBA/XL2000)

    Hans, thank you very much! SendKeys was the right approach.
    VBA Help said that it would accept control key inputs, so I wasted time trying to get into the Print dialog using ^P. When I finally switched to %FP (alt-FP), it worked fine.

Posting Permissions

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