Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Mar 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Selecting paper source using VB (VBA)

    I have written a macro to auto-print a document. I've managed to select A5 paper and lanscape orientation using VB code in Excel but I want to specify a specific tray in the printer from which to print. Anyone got any idea how to do this??

    Thanks!

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

    Re: Selecting paper source using VB (VBA)

    Welcome to Woody's Lounge!

    Excel VBA does not have methods to set the paper tray. One workaround is to define a printer (in the Printers and Faxes control panel), and specify that printer in your macro through Application.ActivePrinter.

    Another method is to use SendKeys, but I wouldn't recommend it.

Posting Permissions

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