title: All columns of excelsheet are not fitted in same page of pdf; while converting using Excel VBA
body: <p>Am trying to convert microsoft excel file with large number of columns (70+) into pdf using a Excel VBA code.</p>
  
  <p>In active workbook, am trying to save 'Sheet1' to PDF format at required path. I have the following code.</p>
  
  <pre><code>Sub GetSaveAsFilename()
  
  Dim fileName As String
  
  fileName = Application.GetSaveAsFilename(InitialFileName:="", _
                                           FileFilter:="PDF Files (*.pdf), *.pdf", _
                                           Title:="Select Path and FileName to save")
  
      If fileName &lt;&gt; "False" Then
  
          With ActiveWorkbook
  
             .Worksheets("Sheet1").ExportAsFixedFormat Type:=xlTypePDF, fileName:= _
             fileName, Quality:=xlQualityStandard, _
             IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
  
          End With
  
      End If
  End Sub
  </code></pre>
  
  <p>When am running the VBA code and saving the pdf file, I see that; the whole excelsheet is not fitted in same page. It's displaying some content in next page.</p>
  
  <p>(Only few columns appear in first page, remaining appear on next page and so on..).</p>
  
  <p>I checked with <a href="http://answers.microsoft.com/en-us/office/forum/office_2007-excel/excel-2007-how-to-publish-wide-worksheet-in-pdf/93d95d10-fe25-4028-ae77-8d2f2756e7a6?auth=1">How to publish a wide worksheet in PDF format?</a>.</p>
  
  <p>But, setting page layout to landscape and converting excel file manually to PDF; also displays some columns in next pages.</p>
  
  <p>There are many <strong>Free Excel to PDF Converter</strong>s available online, which give me same results.</p>
  
  <p>Is there any function available in VBA, through which I can fit all the columns in a single page of PDF?</p>