• Printer Properties in VBA/XL2000 (VBA/XL2000)

    Home » Forums » AskWoody support » Productivity software by function » Visual Basic for Applications » Printer Properties in VBA/XL2000 (VBA/XL2000)

    Author
    Topic
    #397372

    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.

    Viewing 1 reply thread
    Author
    Replies
    • #752059

      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.

      • #752350

        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.

      • #752351

        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.

    • #752060

      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.

    Viewing 1 reply thread
    Reply To: Printer Properties in VBA/XL2000 (VBA/XL2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: