title: How to create a Printer object in VB
body: <p>I am facing an issue in VB 6 while creating a Printer Object.
  Basically, I need to create a printer object so that I can set the correct tray on which printing needs to be performed.</p>
  
  <p>I have the Printer Name with me.</p>
  
  <p>All the code that I am able to find online involves looping through all the available printers and finding a match with our printer name.</p>
  
  <p>Is there a way I can <strong>create the Printer object prn directly from the Printer name</strong>.</p>
  
  <p>Any help would be appreciated.</p>