Powerpoint "save as" does the trick and I can invoke it via win32OLE ... but
when executed interactively it throws up a dialog box asking "do you want to
export every slide in the presentation or just the current slide". I want
"just the current slide" but don't know how (or if) I can do that from my
Ruby script, since this is not a parameter to #saveAs.
I suspect it can't be done. Hope I'm wrong :-(
@sh = WIN32OLE.new('WScript.Shell')
until(@sh.AppActivate('Window Title Here')
end
@sh.SendKeys('%{F4}') # Sends Alt-F4
It's a bit hackish (the until loop is for cases where I hit this code
before the target window has been created, stuff like that), and is
sensitive to breakage if run on a computer where other things are
being done simultaneously, but can be made to work.
-Patrick
But thanks for the tips, I am certain they will come in handy!
"Patrick Fernie" <patrick...@gmail.com> wrote in message
news:240187340511092159s3e6...@mail.gmail.com...
I found a few remarks on the Internet regarding using the "Export"
method rather than "Saveas", maybe worth a try....
(I googled for "powerpoint vba export png")
Regards, Bernhard
ppt.activePresentation.slides.item(1).export 'foo.png', 'png'
<bernhard...@degussa.com> wrote in message
news:1131615543.7...@o13g2000cwo.googlegroups.com...