Re: copy full screen PowerPoint slideshow image and paste into MS Word through vba code



In article <0433c6f6-27e2-4446-b15e-a4bd937cd8c2@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>, Rc
wrote:
On Mar 9, 3:28 pm, Steve Rindsberg <ab...@xxxxxxxxxxxxx> wrote:
In article <05216523-a4e8-4644-8984-e98c5a645...@xxxxxxxxxxxxxxxxxxxxxxxxxx>, Rc
wrote:





On Mar 8, 7:27 pm, Steve Rindsberg <ab...@xxxxxxxxxxxxx> wrote:
In article <f695a98e-90d2-4e44-883e-33e33979c...@xxxxxxxxxxxxxxxxxxxxxxxxxxx>,

Rc wrote:
I am trying to view a slide full screen and then print screen or
capture the screen
then change to Word
then paste the image into Word
return to ppt and repeat for the all slides
The code below gets started but the screenshot is not the full screen
and the paste part is not working.
I can't use any utilites like snagit on these PCs. Any ideas for vb
code to paste into Word from PPT?
==========================================
Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal

  bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)

Private Const VK_SNAPSHOT = &H2C

Sub PrintScreen()
ActivePresentation.SlideShowSettings.Run
keybd_event VK_SNAPSHOT, 1, 0, 0

ReturnValue = Shell("winword.EXE", 1)
SendKeys "^(v)"
End Sub

Wouldn't you be better off using PowerPoint's Slide.Export method to export the
slide to a graphics file, then import that into Word programmatically?

--
Steve Rindsberg, PPT MVP
PPT FAQ:  www.pptfaq.com
PPTools:  www.pptools.com
================================================- Hide quoted text -

- Show quoted text -
Thanks for your response.
I tried saving the slides in various graphic formats and inserting
them into Word and the quality is not as good as when I used full-
screen, print-screen, copy and paste.   Is there a programmatic way to
export that can provide high quality?

Saving is not the same as using Slide.Export (which allows you to specify the
resolution).  A lot depends on the version of PPT though ... recent versions have a
tendency to export junk images.  

One workaround is to export at much higher resolution then downsample (you can call
something like IrfanView from the command line to batch downsample images)..

And if you use PPT 2007, don't apply SP1.  It makes image exports break.

--
Steve Rindsberg, PPT MVP
PPT FAQ:  www.pptfaq.com
PPTools:  www.pptools.com
================================================- Hide quoted text -

- Show quoted text -

Thank you very much for the help. I have spent many hours trying
various ways to export and the image quality of the slide is always
reduced. If anyone has any ideas to improve the quality or use some
parameters in the code to define and improve the quality, etc., it
would be appreciated. I've been using code like this:
====================
With ActivePresentation
.Export path:="c:\data", FilterName:="jpg", scalewidth:=1600,
scaleheight:=800
====================
I made the changes to the registry recommended by Microsoft.


You're still not doing what I suggested. Use the *SLIDE.EXPORT* method, not
Presentation.Export. You'll have to call this once per slide. For example:

Dim oSl As Slide
For Each oSl In ActivePresentation.Slides
Call oSl.Export(FileName:="C:\Temp\Slide" & CStr(oSl.SlideIndex) & ".JPG", _
filtername:="JPG", _
ScaleWidth:=1024, _
ScaleHeight:=768)
Next


--
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================


.



Relevant Pages

  • Re: 4:3 -> Widescreen PPPresentation: VBA transfer help
    ... is a noticable drop in the image's quality. ... If you copy/paste individually or copy/paste the shapes on a slide, ... Switching to PNG or JPG images will leave the results uneditable but will give ... Steve Rindsberg, PPT MVP ...
    (microsoft.public.powerpoint)
  • Re: PowerPoint 2000 Hyperlink frustration
    ... So when the HTML comes back in, there's nothing in there that confuses PPT. ... After doing that, I went back to the slide with the non-functioning Test2 link, reapplied a link ... a working ppt can be rendered non working (with Hyperlinks) ... set my new ppt test file to slide sorter view also and drug a slide from ...
    (microsoft.public.powerpoint)
  • Re: PowerPoint 2000 Hyperlink frustration
    ... After doing that, I went back to the slide with the non-functioning Test2 link, reapplied a link ... to the text, saved, quit, restarted PPT, opened the file again and it worked. ... a working ppt can be rendered non working (with Hyperlinks) ... set my new ppt test file to slide sorter view also and drug a slide from ...
    (microsoft.public.powerpoint)
  • RE: Frustrated with PPT
    ... I've been using PPT for over 10 years now and I know that when toolbars are ... This is NOT common to PPT. ... If I copy a simple "manually created" text block from one slide, ... the slide masters delete and there ...
    (microsoft.public.powerpoint)
  • Re: Can one presentation be embedded within another?
    ... Using remote control you can tell Excel to open any particular PowerPoint ... Slide Show>Custom Shows... ... You might check it out in PPt Help. ... [MVP] ...
    (microsoft.public.mac.office.powerpoint)