title: Changing printer in VBA for Access also change page layout
body: <p>I'm trying to provide a control for printer selection on a form.</p>
  
  <p>Combobox named <code>cbxPrinterList</code> is listing the printer names. <code>CompanyHistory</code> report should be printed from selected printer when user click on <code>Command1</code> button. How can I enforce it to print in Landscape.</p>
  
  <p>Following code works well with one exception. The report is designed in landscape orientation. But it is printing in portrait. </p>
  
  <pre><code>Private Sub Command1_Click()
  
     Dim reportName As String
     reportName = "CompanyHistory"
  
     Dim vPrinter As Access.Printer
  
     Set vPrinter = Application.Printers(cbxPrinterList.ListIndex)
     vPrinter.Orientation = acPRORLandscape
  
     DoCmd.OpenReport reportName, View:=acViewPreview, WindowMode:=acHidden
     Set Reports(reportName).Printer = vPrinter
  
     DoCmd.OpenReport reportName, View:=acViewNormal
     Set Application.Printer = Nothing
  
     ' Close report without saving.
     DoCmd.Close ObjectType:=acReport, ObjectName:="Invoice", Save:=acSaveNo
  
  End Sub
  </code></pre>