title: Macro to save file to folder depending on month and customer
body: <p>I have the follwoing code: </p>
  
  <pre><code>ActiveWorkbook.ExportAsFixedFormat Type:=xlTypePDF, Filename:="U:\sales\Quotes test\" &amp; Range("s2").Value &amp; ".pdf" _
      , Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
      :=False, OpenAfterPublish:=True
  End Sub
  </code></pre>
  
  <p>This works perfectly but i'd also like it to do a few more things, i have had a play around with it but i just can't get it to work the way i want it to if its even possible!</p>
  
  <p>I'd like it to save as a .xlsm file AS WELL as the PDF
  i'd also like it to save to a folder dependent on the year, month and customer. e.g.</p>
  
  <p><code>U:\sales\quotes test</code> this will be static and always exist. </p>
  
  <p><code>U:\sales\quotes test\2020\May\Customer</code> (dependant on cell value D6 in the sheet)</p>
  
  <p>Now here's the clinker! if the folder for customer doesn't exist i'd like it to first create the folder in the correct year and month depending on when the document was created. And then save a PDF and .xlsm version of the document...</p>
  
  <p>Any help would be greatly appreciated!! </p>