PowerPoint Automation to extract info from slides

D

Donevan

I have inherited a project in which I need to extract information from a
power point presentation. I need to loop thru each slide grabbing some text
info. The majority of this code is in place and works. However, to
accomplish this the presentation goes into slideshow mode and is visible.

This fact that the presentation pops up and cycles thru the presentation can
be very distracting to the end users so I wish to turn this off. The method
being employed using VC++ 2005 w/ IDispatch calls. If I set the "Visibility"
to false then the slide show does not display, but no information is gathered
from the slides either.

Is there a property I can set that will push this to the background or
minimize it such that I can still gather the information from each slide but
not take over the desktop?

Thanks
Donevan
 
S

Steve Rindsberg

I have inherited a project in which I need to extract information from a
power point presentation. I need to loop thru each slide grabbing some text
info. The majority of this code is in place and works. However, to
accomplish this the presentation goes into slideshow mode and is visible.

This fact that the presentation pops up and cycles thru the presentation can
be very distracting to the end users so I wish to turn this off. The method
being employed using VC++ 2005 w/ IDispatch calls. If I set the "Visibility"
to false then the slide show does not display, but no information is gathered
from the slides either.

Is there a property I can set that will push this to the background or
minimize it such that I can still gather the information from each slide but
not take over the desktop?

The Application object has a WindowState property that can be set to

1 Normal
2 Minimized
3 Maximized

Changing this probably won't affect the slide show window, but why does the
presentation need to be in slideshow mode in the first place? To get at the
text, you don't need to be in any particular view.

There are some VBA examples of extracting text here:

Exporting stuff
http://www.pptfaq.com/index.html#name_Exporting_stuff
 
D

Donevan

Steve,

Thanks. This is useful, however setting the WindowState to minimized(2)
does not prevent the slide from popping up. So I have moved to getting all
the slides and then incrementing over the slides. I am using the "Item"
method with the "Index" argument. Unfortunately when I do make the call to
GetIDsOfNames with LPOLESTR *rgszNames set to "Item" and "Index" the DISPIDs
for both come back as 0. But the RESULT is successful Other method names
come back with more meaningful IDs. Any thoughts?

Donevan
 
S

Steve Rindsberg

Thanks. This is useful, however setting the WindowState to minimized(2)
does not prevent the slide from popping up.

In slide show view, yes? I was afraid of that ... the app and slide show are
different windows.
So I have moved to getting all
the slides and then incrementing over the slides. I am using the "Item"
method with the "Index" argument. Unfortunately when I do make the call to
GetIDsOfNames with LPOLESTR *rgszNames set to "Item" and "Index" the DISPIDs
for both come back as 0. But the RESULT is successful Other method names
come back with more meaningful IDs. Any thoughts?

I work in VB/VBA so this little bit of info doesn't make any AHA lights go on over
my head. ;-)

But if you'll quote a bit more of your code, I might be able to work it out from
context.
 
J

Joseph M. Newcomer

Take a look at my PowerPoint Indexer program on my MVP Tips site. It has lots of cool MFC
stuff. It runs the the presentation grabbing information from the notes field, and does
not cause the slides to display (but if PowerPoint is up with the slides in it, I have
cool "back link" information that allows me to click on an object in my program and get
the slide that contains it!). Code is open source and free to all.

Note that at no time does it actually cause the slide program to be cycled. I suspect the
basic algorithm is something involving move-to-next-slide and
get-stuff-from-current-slide, and that is not necessary. I've never seen the slides
change at all when my program runs!
joe

I have inherited a project in which I need to extract information from a
power point presentation. I need to loop thru each slide grabbing some text
info. The majority of this code is in place and works. However, to
accomplish this the presentation goes into slideshow mode and is visible.

This fact that the presentation pops up and cycles thru the presentation can
be very distracting to the end users so I wish to turn this off. The method
being employed using VC++ 2005 w/ IDispatch calls. If I set the "Visibility"
to false then the slide show does not display, but no information is gathered
from the slides either.

Is there a property I can set that will push this to the background or
minimize it such that I can still gather the information from each slide but
not take over the desktop?

Thanks
Donevan
Joseph M. Newcomer [MVP]
email: (e-mail address removed)
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
 
J

Joseph M. Newcomer

If you are using MFC, read my Indexer source code. See previous email.
joe
Steve,

Thanks. This is useful, however setting the WindowState to minimized(2)
does not prevent the slide from popping up. So I have moved to getting all
the slides and then incrementing over the slides. I am using the "Item"
method with the "Index" argument. Unfortunately when I do make the call to
GetIDsOfNames with LPOLESTR *rgszNames set to "Item" and "Index" the DISPIDs
for both come back as 0. But the RESULT is successful Other method names
come back with more meaningful IDs. Any thoughts?

Donevan
Joseph M. Newcomer [MVP]
email: (e-mail address removed)
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
 

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