title: Excel Print to PDF to Folder
body: <p>Going a bit crazy on this one. Not sure why this code isn't working. My PDF file is saving but its saving to my Documents folder instead of the directed file. It needs to go into this file to save the documentation and I have another code to send an email and attach this file from this directory as well. </p>
  
  <pre><code>Sub PrintPOPDFtoFolder()
  
     ChDir "R:\Procurement\Purchase Orders" &amp; "\" 'files directory
     fileSaveName = ActiveSheet.Range("Q7") 'Name the PDF file
  
      ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
         fileSaveName _
      , Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
      :=False, OpenAfterPublish:=False
  
  
      MsgBox "File Saved " &amp; " " &amp; fileSaveName
  
  End Sub
  </code></pre>