title: VB6 Set Printer Orientation on Runtime not working on some Printers
body: <p>I have a code to print data report on vb6, I use this to change the layout or the orientation of printer, it was working on my last printer EPSON L210 I think it has Ip address as Port, but on Printer Epson L120 it's a network printer.. when i use error handler to check the error it says subscript out of range.</p>
  
  <pre><code>Dim obj As PageSet.PrinterControl
  Dim mPointer
  Set obj = New PrinterControl
  mPointer = Screen.MousePointer
  Screen.MousePointer = vbHourglass
  DoEvents
  If vOrientation = 1 Then
      Printer.Orientation = vbPRORLandscape
      obj.ChngOrientationLandscape
  Else
      obj.ReSetOrientation 'This resets the printer to portrait.
  End If
  Screen.MousePointer = mPointer
  DoEvents
  </code></pre>