VBA to Printscreen, then save image

A

Alexf

Hey guys;

I recently came up with this idea. I searched around for some hours, but
couldn't find it.

This is what I want to do: Printscreen the running presentation slideshow,
then save it to desktop.

There seems to be some solutions, but I'm not sure if they work.

See, the sendkeys function doesn't work on printscreen, right?

Thanks in Advance.
 
A

Alexf

Thats not what I meant, sorry for the misunderstanding.

What I need is a VBA Macro to PrintScreen the curent screen and save it on C:\
 
M

Michael Koerner

Why not just save your presentation as image files and you will have the
same results as when you try to do a screen capture

--
Michael Koerner
MS MVP - PowerPoint


Thats not what I meant, sorry for the misunderstanding.

What I need is a VBA Macro to PrintScreen the curent screen and save it on
C:\
 
D

David Marcovitz

I think I understand what you want, but I am not sure it is possible.
The closest I could come up with was:

ActivePresentation.SaveAs "myFile", ppSaveAsJPG

This is missing two key elements (I think):

(1) It saves the entire file as a series of JPG pictures in a folder
named myFile, rather than just the current slide.

(2) If you are trying to capture the state of animations, this probably
won't do it; it probably just shows the animations in the final state.

The alternative is looking at something like Shyam's Capture Show add-in:

http://skp.mvps.org/cshow.htm

--David
 
J

John Wilson

Pretty sure you are right and this or the hidden method SlideRange.Export (as
jpg) will produce the edit view of the slides. As Alexf said you can't use
send keys [prtscr].

It is possible to "print screen" in vba using the api call "keybd_event".

Declare the api
and use

keybd_event &H2C,0,0

You would still have to write code to get the clipboard contents as a jpg
--

john ATSIGN PPTAlchemy.co.uk
Custom vba coding and PPT Makeovers
Free PPT Hints, Tips and Tutorials
http://www.pptalchemy.co.uk/powerpoint_hints_and_tips_tutorials.html
 
Joined
Mar 4, 2014
Messages
1
Reaction score
0
This topic explains about taking a print screen and saving it as an image file.

officetricks.com/print-screen-save-as-image-file-attach-to-sheet-automate-in-vba/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top