title: Print all sheets through CutePDF Writer
body: <p>I was using .ExportAsFixedFormat from <a href="https://stackoverflow.com/questions/32945802/select-all-sheets-and-print-into-single-pdf-file">this topic</a>, but unfortunately, Printed PDF had some issues about formatting and some symbols.</p>
  
  <p>I've tried CutePDF Writer and it is OK.</p>
  
  <p>Now, I want to select all sheets and to print as a single file, as the same with .ExportAsFixedFormat function</p>
  
  <p>Is there any shortcut to select all sheets and to print them through VBA to PDF?</p>
  
  <p>I've tried to insert an array, which I populated with sheet names. But I have an error with type mismatch.</p>
  
  <pre><code>Private Sub CommandButton9_Click()
  
  Dim SNarray, i
  Dim Filename As String
  
  Filename = "E:\TestMe1.pdf"
  
  
  ReDim SNarray(1 To Sheets.Count)
  For i = 1 To Sheets.Count
      SNarray(i) = ThisWorkbook.Sheets(i).name
  Debug.Print SNarray(i)
  Next
  
  
  
  Application.ActivePrinter = "CutePDF Writer on CPW2:"
  Sheets(SNarray()).Select 'Here is the TYPE MISMATCH
  ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:="CutePDF Writer on CPW2:", PrintToFile:=True, Collate:=True, prtofilename:=Filename
  
  End Sub
  </code></pre>
  
  <p>Thanks!</p>