Hey guys,
I'm looking for a little help constructing a macro to save a screenshot of range ("A1:I35") as a jpg file. I've tried converting the active area into a table and saving this without much luck. Any help would be appreciated!
Hey guys,
I'm looking for a little help constructing a macro to save a screenshot of range ("A1:I35") as a jpg file. I've tried converting the active area into a table and saving this without much luck. Any help would be appreciated!
How about:
![]()
Please Login or Register to view this content.
Make Mom proud: Add to my reputation if I helped out!
Make the Moderators happy: Mark the Thread as Solved if your question was answered!
This copies the selected range but the output ends up in the coding and not on paint. I would still need to be able to save the paint file as a jpg file as well.
Maybe you left your focus in VB Editor. Each of my runs pasted correctly to MSPaint and left open a dialogue to choose the filename.
Try increasing paste delay to 3 seconds.
Here it is again with more SendKeys, going through naming the file and changing the type to JPEG.
![]()
Please Login or Register to view this content.
Last edited by daffodil11; 05-14-2015 at 06:20 PM.
This works perfectly! Reputation addedOut of curiosity, did you use the macro recorder to do this?
Nope!
I began with a subroutine I wrote that copies a range of cells and opens an email to paste it into.
I did a little research to work out the Shell command.
The hardest part was figuring out that I needed to removed the filepath and only include the executable.
From there I just looked at Paint and figured out the key presses required to Save As, and then navigate the menu to change file type.
SendKeys are the same as the operating system pushing keys for you and are great for interacting with non-VB interfaces such as AS400.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks