title: Excel InterOp: How to WorkBook.SaveAs using absolute path when ":" is not allowed?
body: <p>I'm trying to save a workbook from memory using the following code:</p>
  
  <pre><code> this.Target.WorkBook.SaveAs(this.Target.WorkBookPath, Interop.XlFileFormat.xlWorkbookNormal,
                          Type.Missing, Type.Missing, 
                           Type.Missing, Type.Missing, 
                            Interop.XlSaveAsAccessMode.xlNoChange,
                           Type.Missing,Type.Missing,Type.Missing,Type.Missing);
  </code></pre>
  
  <p>Where this.Target.WorkBookPath is read from the config file as:</p>
  
  <blockquote>
    <p>D:\Devzone\rpt_SalesMargins2</p>
  </blockquote>
  
  <p>But Im getting this error message:</p>
  
  <blockquote>
    <p>The file could not be accessed. Try one of the following:\n\n• Make
    sure the specified folder exists. \n• Make sure the folder that
    contains the file is not read-only.\n• Make sure the file name does
    not contain any of the following characters:  &lt;  >  ?  [  ]  :  | or 
    *\n• Make sure the file/path name doesn't contain more than 218 characters.</p>
  </blockquote>
  
  <p>So if I cant use ":" then how can I specify D:\ ? </p>
  
  <p><strong>UPDATE / SANITY CHECK</strong> </p>
  
  <p><img src="https://i.stack.imgur.com/NDC5m.gif" alt="config"></p>
  
  <p><img src="https://i.stack.imgur.com/9HdPz.gif" alt="SANITY"></p>
  
  <p>In this image the file is called rego, i have tried several random names and all work as relative paths but fail when absoluted.</p>