title: Using Selection.ExportAsFixedFormat to generate PDF properly
body: <p>I want to export to pdf all the sheets on the workbook except the first one. To do that I used Selection.ExportAsFixedFormat instead of ActiveWorkbook.ExportAsFixedFormat.</p>
  
  <p>The problem using Selection.ExportAsFixedFormat, is that for each sheet, the only part of it that will appear ond the correspondent pdf page is a manual selection instead of all the printing area as it should be (if I select only one cell it will be the only one that appears on the pdf). Using ActiveWorkbook.ExportAsFixedFormat the pdf is generated as intended.</p>
  
  <pre><code>Sub PDF()
      Dim SaveAsStr As String
      Dim strName As String
      Dim i As Long
      ReDim ArraySh(2 To Sheets.Count)
  
      For i = 2 To Sheets.Count
          ArraySh(i) = Sheets(i).Name
      Next
  
  ...
  
      'ActiveWorkbook.ExportAsFixedFormat Type:=xlTypePDF, fileName:=SaveAsStr &amp; ".pdf", OpenAfterPublish:=True, IgnorePrintAreas:=False
  
      Sheets(ArraySh).Select
      Selection.ExportAsFixedFormat Type:=xlTypePDF, fileName:=SaveAsStr &amp; ".pdf", OpenAfterPublish:=True, IgnorePrintAreas:=False
  
  End Sub
  </code></pre>
  
  <p>How can I use the Selection method, to generate the PDF properly?</p>