Email Embedded Microsoft Browser Map

Galius

New Member
Joined
Jul 27, 2018
Messages
30
Hey Guys,

So I have a basic spreadsheet here where I put addresses and then click View Map and it'll load the map in an embedded Microsoft Web Browser ActiveX Control. All I want to do is right a script to basically screenshot that embedded map then paste it in an email to send.


I've uploaded the sheet to the google drive above. I tried posting images but it kept telling me too large even though they were only 250kb.
 
Ok, I really need to see exactly what's happening because I've tried this on 22 different non-visible windows/window handles, and they all worked, so I'm at a bit of a loss.

Can you please show me:
(1) a full screen capture of the webbrowser control in the worksheet in Excel;
(2) the image that you want to have output at the end of it; and
(3) the images that you're instead getting (through methods #1, #2, and now #3) (i.e., the 'failures').

i suspect that something else is causing the problems, but I can't quite think what it might be. Thanks.
Hey Dan, I think what I might do is just build into the macro to move location so it captures the whole screen then move back. I tried that and it worked great so I don't think there's any need to work on it anymore. Thanks heaps for all your help. :)
 
Upvote 0

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Well that's actually what the first attempt above does - it takes a full screen capture, and then crops it to the dimensions/location of the window handle - but again, that would require that it be visible. I had hoped that this new PrintWindow would solve that problem, but if that's still not working for you, I'm not sure what the problem could be. The only other thing it might be is if you're still using an existing workbook - it may be worth just starting a brand new workbook, adding this code, and adding a new webbrowser control to that new workbook and see how it goes. Good luck!
 
Upvote 0
Well that's actually what the first attempt above does - it takes a full screen capture, and then crops it to the dimensions/location of the window handle - but again, that would require that it be visible. I had hoped that this new PrintWindow would solve that problem, but if that's still not working for you, I'm not sure what the problem could be. The only other thing it might be is if you're still using an existing workbook - it may be worth just starting a brand new workbook, adding this code, and adding a new webbrowser control to that new workbook and see how it goes. Good luck!
Thanks for all the help Dan! Legend!
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top