title: Save embedded WebBrowser as Picture - Excel VBA
body: <p>I feel like I've given this problem my due diligence. So I come to you. </p>
  
  <p>I have an excel file with an embedded Microsoft Web Browser. The file is a "centers of gravity" calculator. It is taking a list of addresses, geocoding them via google, then saving to an html file. The webbrowser then reimports the file with markers and icons on a google map for the centers of gravity. This aspect of the tool works great. </p>
  
  <p>Now, I wish to export this map to a PowerPoint. I've already written the code to do that, but I cannot get a picture to transfer out of the webbrowser. </p>
  
  <p>Below is only able to copy the shape itself, a paste on this would create another webBrowser in excel. A paste to powerpoint does nothing.</p>
  
  <pre><code>Thisworkbook.Activesheet.Shapes("Webbrowser1").Copy
  </code></pre>
  
  <p>Below has not worked at all, it keeps telling me "expected =" maybe this isn't even VBA..</p>
  
  <pre><code>webbrowser1.document.execcommand( copy false null)
  </code></pre>
  
  <p>I've tried setting the range of cells behind my webbrowser equal to a variable, then copying that variable, but to no success.</p>
  
  <p>Toggling the design mode on/off does allow you to select the browser object. I've tried turning design mode off, selecting picture, copy->copyaspicture, but that didn't work either. </p>
  
  <p>I don't really have a huge segment of code to work with here as the issue is pretty specific and I've basically written around it all I can. </p>
  
  <p>I'm open to more out of the box solutions like getting the activewindow left/top and picture top/left and doing some sort of partial screengrab. I actually tried this too but was not successful (probably due to me). </p>
  
  <p>If anyone has ideas, I would be very greatful. Spent a good 5 hours of my Friday on this one..</p>
  
  <p>Thanks</p>