Auto-updating a Powerpoint from Access

lilepeeps

New member
Local time
Today, 08:58
Joined
Jun 28, 2010
Messages
2
Hi all,

I've been scouring Google for the last two days looking for a way to do this and have yet to come across an answer that "makes sense" to me.

Here's what I'd like to do.

With my colleagues we've created a 180 slide powerpoint deck with information on lots of different topics which can be presented to customers. However the intention isn't for a presenter to use all 180 slides but to select them by subject, e.g. building a customised deck.

What I've started doing is designing a form in Access with a simple GUI that a person wanting to build a customised deck can use. However I'm stuck on the technical bit.

Say you select 4 of the tick boxes and then click on generate I'd like this to select only the corresponding slides from Powerpoint and generate this into a custom presentation.

I know you have to use a Visual Basic code to do this and have used some of the examples on Microsoft but these all create from scratch and don't use existing data to "select" from.

Any ideas anyone?

Thanks in advance.:D
 
Welcome to AWF :)

What you're looking to achieve would require expert coding skills. The term for this is Powerpoint Automation. Do a google search for this term.

Some other tips for you: You should save your powerpoint docs as templates so that they don't get overriden. You also need to look into the File System Object so you can manipulate files or it can be done using Shell.
 
I think your easiest option would be to put together something like you described and then in VBA ...

1. Copy the master file.
2. Delete the slides that are not 'ticked'.

You can copy and past slides, but in my past experience messing with PowerPoint the aforementioned would probably be the easiest route.

Here is the object model for PowerPoint. I think what you would want to look at is the Slide object. Oh yes, be sure to set the PowerPoint references, too. I've sorta set up some of the calls for you ...

For instance, lets say you set up a loop with your check boxes. That would parallel all of the slides in your PowerPoint.

Code:
Dim oPPTApp As PowerPoint.Application
Dim oPPTFile As PowerPoint.Presentation
Dim oPPTSlide As PowerPoint.Slide
 
'copy the master 
Set oPPTFile = oPPTApp.Presentations.Add(True)  
oPPTFile.SaveAs "c:\mypres.ppt" 
 
'delete a slide where i is the slide number
oPPTFile.Slides(i).Delete

So as you can see, if you add a loop to this and depending if the checkbox was ticked, (If-Then) to skip the slide or to delete it.

HTH,
-dK
 
Thanks guys.

I'll give it a go and let you know how I get on.

Pete
 
Powerpoint is a little annoying with what you want to do. The trick is to name your slides the way you would like to name them and then you can simply choose them from that.

Here is a quick and dirty access DB that will help you to name your slides or shapes as you like.

I would suggest you name each slide as you want. Then make this .ppt your master.

The user chooses the slides he wants from your form. You get this .ppt and make a copy of it. Then delete and even reorder the copy as you like.

If you want to really show off when you open your form you could get the collection of slide names from the ppt and then allow the users to choose. That way if you add new slides to your .ppt they will automatically appear in the form.
 

Attachments

Users who are viewing this thread

Back
Top Bottom