title: VBA / .Net download files from password protected website via Windows Security
body: <p>I have a SharePoint test website (Azure SharePoint farm) which contains several image files and some document templates. I want to download the images to my local drive. I anticipate looping through a list of URLs, e.g. <a href="http://mySharePointSite/Sites/Images/Image01.png" rel="nofollow noreferrer">http://mySharePointSite/Sites/Images/Image01.png</a> and downloading each in turn. I've tried URLDownloadToFile which works great if I put the images on a regular website but I'm unable to get past Windows Security with this approach. </p>
  
  <p>I had a go at creating an InternetExplorer.Application Object (late binding) and can view my images but am unable to download them.  Was trying ieApp.ExecWB but this throws a <a href="https://support.microsoft.com/en-us/kb/251133" rel="nofollow noreferrer">Run Time Error that seems insurmountable</a>.  </p>
  
  <p>I've also tried WinHTTP.WinHTTPrequest.5.1 (<a href="https://stackoverflow.com/questions/22051960">StackOverflow 22051960</a>) but, while that looked promising it returned a short string "???????" instead of an image.</p>
  
  <p>I'm really hoping for a VBA solution and am wondering if Impersonate User might provide options, or if there are other options (excluding using SendKeys). Sadly I'm pushing the limits of my VBA knowledge and could really use some guidance.  </p>
  
  <p>Is it possible to download from share point from VBA?<br>
  If so how, am I missing something simple?</p>
  
  <p>I can paste code, but really I'm not sure I have anything worth sharing.  If this is not possible or unreliable in VBA then would be possible with VB.Net (my next steepest learning curve)?</p>