title: Excel macro saving sheet as pdf to sharepoint to location dependent on input in new folder
body: <p>I am new to VBA and have to complete a task for my manager about saving sheet as a pdf into sharepoint (if firstly can be done) which creates a folder at the location with the same name as the saved PDF and saves the pdf there.</p>
  
  <p>Now where it gets harder for me is at the location in sharepoint there are 3 folders, for USD, EUR and GBP and depending on a field in the excel (which will denote one of the 3 currencies) it will have to be saved at that location</p>
  
  <p>(Sharepoint URL or mapped to network drive)\Quote\USD\new folder created with file name matching pdf\pdf file</p>
  
  <p>(Sharepoint URL or mapped to network drive)\Quote\EUR\new folder created with file name matching pdf\pdf file</p>
  
  <p>(Sharepoint URL or mapped to network drive)\Quote\GBP\new folder created with file name matching pdf\pdf file</p>
  
  <p>Is it the sharepoint URL will work or is it only when mapped to the network drive (which I have with a filepath with my username which im guessing would stop working from anyone else but me)</p>
  
  <p>I am using the below which saves to sharepoint but with me as User_1 I cant see how anyone else will be able to?</p>
  
  <pre><code>Sub test()
  
       ChDir "C:\Users\user_1\company\Sales Team - Documents\Quotes"
  With Sheets("Quote")
  
      .ExportAsFixedFormat _
      Type:=xlTypePDF, _
      Filename:="C:\Users\user_1\company\Sales Team - Documents\Quotes\" &amp;   ActiveSheet.Range("B2").Value &amp; " Quote.pdf", _
  
      Quality:=xlQualityStandard, _
      IncludeDocProperties:=True, _
      IgnorePrintAreas:=False, _
      OpenAfterPublish:=False
  End With
  end sub
  </code></pre>
  
  <p>It took me a while to figure out the above (which im sure is really simple) but i am still learning, </p>
  
  <p>Can anyone help me with this?</p>
  
  <p>Thanks</p>