title: Using VBA to insert/update image in PowerPoint?
body: <p>I am making an interactive Powerpoint presentation that has previously read a text file from my local server (XAMPP) and displayed it.  I'd like to now update it so that the user can hand-write their response, and it displays that on the slideshow.  I have a jQuery plugin that lets someone use a stylus and it saves the 'drawing' as an image on the local server.</p>
  
  <p>My question is, how can I insert the image into PowerPoint using a VBA Macro?  Or since the image always will have the same file path, but will be replaced with a different image, can I somehow "Update" the image on the slide?  Sorry if it's confusing.</p>
  
  <p>This is the VBA I tried:</p>
  
  <pre><code>Sub insert()
      Dim oPic As Shape
      Set oPic = ActivePresentation.Slides(1).Shapes.AddPicture("http://localhost/image.png", False, True, 0, 0, -1, -1)
  End Sub
  </code></pre>
  
  <p>I could also get the path of the image on the computer, not the server.</p>
  
  <p>When I run the macro, I get a "file not found" error.  Does anyone know what's wrong?</p>
  
  <p>Thanks!</p>
  
  <p>PS: If anyone's interested, the plugin is called <a href="http://thomasjbradley.ca/lab/signature-pad/" rel="nofollow">Signature Pad</a>.</p>