title: Applescript throws error when changing file name
body: <p>I am trying to create a generic temp .pdf and then change the file name of thetemp file to the specific file name in the same folder on an NAS drive using the code below.</p>
  
  <p>I get error -10006 'can't change name of file...". Any help would be most appreciated.</p>
  
  <pre><code>
  tell application "Microsoft Excel"
  save active workbook in ("Volumes:FrameNASfolder:12 PANDORA:Pandora PDFs:PDF
      TempFolder:TempName.pdf") as PDF file format
  end tell
  
  tell application "Finder"
  set name of "Volumes:FrameNASfolder:12 PANDORA:Pandora PDFs:PDF
   TempFolder:TempName Invoice + Quotation Sheet.pdf" to "3999A Estimate TEST 14-07-20 16-32.pdf"
  end tell
  
  </code></pre>
  
  <p>I can generate the temp file every time, but no joy with the name change.</p>