VBA script to export image and text from ppt to Excel

  • Thread starter Thread starter stevenleongusa
  • Start date Start date
S

stevenleongusa

Hi,
I want to find out how to read data from powerpoint including image
and text. I want to do it dynamically way to read from ppt, purge
the
data into Excel or somewhere text file and save the image as jpg or
gif. I don't care using Excel or VB script to do it. I need a way
to
retrieve the powerpoint data. If you know, please let me know. Or
suggest me the way you know.

Thanks,
- Steven
 
Steve

Have a look in the programming section ofwww.pptfaq.com

Text Exporthttp://pptfaq.com/FAQ00274.htm

Shape as graphic exporthttp://pptfaq.com/FAQ00556.htm

Should get you on the right track but we will happily write code to do
exactly what you need if you're stuck.
--
Amazing PPT Hints, Tips and Tutorials

http://www.PPTAlchemy.co.ukhttp://www.technologytrish.co.uk
email john AT technologytrish.co.uk






- Show quoted text -

Thanks. Does anyone know the script run outside of ppt? no inside. I
need a script vbs to grab all content and paste in text file.

- Steven
 
Thanks. Does anyone know the script run outside of ppt? no inside. I
need a script vbs to grab all content and paste in text file.

Not offhand, but if the scripting language you use can create an instance of
PPT and automate it, the same code with a few mods should work in that
environment as well.
 
I figured out. But I still have to activate the powerpoint Visible =
True in order for the script to work. Is that a way to silent this
powerpoint? or display in background not to present to user.

Another question. how to close this powerpoint?

Set pptapp = CreateObject("PowerPoint.Application")
pptapp.Visible = True
Dim PPTPath
PPTPath = GetPath & "test.ppt"

MsgBox " Powerpoint = " & PPTPath
Set oPres = pptapp.Presentations.Open (PPTPath)

...
Set oPres = pptapp.Presentations.Close ?


- Steven
 
I figured out. But I still have to activate the powerpoint Visible =
True in order for the script to work. Is that a way to silent this
powerpoint? or display in background not to present to user.

Another question. how to close this powerpoint?

I'm not a VBScripter but try this to close the current presentation:

oPres.Saved = True ' to clear the "dirty" flag
oPres.Close

pptapp.Quit ' quit PPT

What's the rest of the script doing that forces you to make PPT Visible?
 
Back
Top