views:

175

answers:

2

Just wondering:

If I have a ppt slides that I want to extract information out of, and I set up the template for all these slides that are used by various people through out the organization, and I know all the "names" to each text box object,

can I use some vb to pull that information out of the ppt slides into an access database?

I know how to take an access form and create a ppt presentation with entered information in the same fashion, just reverse process. so I am assuming that if I set up these ppt slides, and name all the text boxes what I want to name them, that I should be able to do this in the opposite direction, right?

thanks!

+1  A: 

See here for a mail merge example for PPTs.

Preet Sangha
hey thanks this is interesting. not really what i was talking about, but interesting none the less.
Justin
+5  A: 

Yes you can do the reverse and have access read a powerpoint slide. I created a powerpoint 2007 presentation with two slides, a Title slide and a content slide. Inside a an empty access 2007 db, I added a code module with the following test. You will also need to add a refrenence to the powerpoint object in the Access VBA project.

Public Sub ImportPowerPoint()
    Dim app As PowerPoint.Application
    Dim pres As PowerPoint.Presentation
    Dim ps As PowerPoint.Presentations
    Set app = New PowerPoint.Application
    app.Activate
    Set pres = app.Presentations.Open("C:\Temp\title slide.pptx")
    Debug.Print pres.Slides(1).Shapes(1).Name & " " & pres.Slides(1).Shapes(1).TextEffect.Text
    Debug.Print pres.Slides(1).Shapes(2).Name & " " & pres.Slides(1).Shapes(2).TextEffect.Text
    Debug.Print pres.Slides(2).Shapes(1).Name & " " & pres.Slides(2).Shapes(1).TextEffect.Text
    Debug.Print pres.Slides(2).Shapes(2).Name & " " & pres.Slides(2).Shapes(2).TextEffect.Text
End Sub

the Text that you are after is contained inside the TextEffect object associated to the shape object.

hope this helps (sorry I didn't have office 2003 but should be very similar)

Nathan Fisher
thanks Nathan. This will help get me started for sure.
Justin