Getting started with some automation

B

Bill

I would like to create an powerpoint application
that is database driven. Like have a template that
has a picture as the background and a single text
box that I load from within VBA code. The code
would prompt the user for a song title. The VBA code
then obtains song lyrics from within an Access mdb
file to populate each slides text box in sequence. The
result to be a pps file containing slides with a constant
background with song lyrics.

Is there any there any support within PowerPoint for
such automation? I do see the option to use a
Visual Basic Editor, but it's not clear that the language
elements that would be required to carry out the tasks
I've described above would be available.

I don't know of any support for powerpoint slide objects
from within Access VBA such that the process could
be driven from with Access.

Any direction here would be greatly appreciated.

Thanks,
Bill
 
G

Guest

Bill

I am not sure why you would want such a PPT template... however...

There is an awful lot you can do using either PowerPoint VBA or Access.

I think I am right in saying:

Choose a starting point (PowerPoint or Access) then

If you chose PowerPoint's VBA, make sure your VBA project has the
appropriate database references included (DAO 3.5 or 3.6 or Active Data
Objects 2.8 depending on your data access background) to give you database
manipulation features. I think this would be my preferred starting point.

or

if you chose Access, make sure you include a reference to the PowerPoint 11
object in your VB Module to give you slide object manipulation features.

Having done this then experiment!

Don't forget there may be some limitations if you plan to run this from the
PowerPoint Viewer only!

Regards

John
 
A

Austin Myers

Bill,

Yes you could do this, but I see no need to involve Access, a simple text
file would do. You would populate a combobox with the contents of the text
file, the user would select it, and based upon the information (pathname) in
the textfile you would then insert the audio in the presentation. Note:
Inserting it with VBA is not always the easiest thing to do. Depending upon
which version of PPT you are using you will use different methods to insert
it. (using the MainSequence.Timeline or not.) You would then need to set
the animations (When and how to play) for each inserted audio file. Also
keep in mind that different types of audio (wav vs others) are inserted
differently. Wav files are embedded while others are an OLE Object and must
be handled as such.

Now one question, is this really easier than Insert > From File and
selecting it?

Hope this helps,


Austin Myers
MS PowerPoint MVP Team

Provider of PFCMedia, PFCPro, PFCExpress
http://www.pfcmedia.com
 
B

Bill

There won't be any audio files. Only a single text box with
four lines of text. There would likely be anywhere from 8
to 20 slides per song title. The background picture on the
slide would be a constant.
 
B

Bill

John,
The primary reason for "driving" this from Access is that we have
a major Access application wherein I would add new functionality
that offers a directory service to a database of song lyrics. With
that, I would want to have a "constant" slide background and a
single textbox which I would populate with 4 lines of either verse
or chorus lyrics. At the user's direction, I would generate a ppt
or pps file containing a set of slides for any given song. I'm fairly
knowledgeable of VBA applications in Access and I'm assuming
that the PowerPoint slide and textbox objects would be fairly
simple to manipulate from within Access. If that's not true, then
I would revisit the idea of learning the use of VBA in PowerPoint
from a class module of a PowerPoint slideshow.

Bill
 
G

Guest

Bill

Once you add a reference to the PowerPoint object model from your Access VB
project, you will have access to all the facilities needed to
create a new or open an existing slideset
select and apply a template / design
edit or add slides
edit and add objects on the slides

Open PowerPoint and record a couple of macros whilst carrying out the above
actions, then view the code to see how VBA does it!

Also check out the PowerPoint VB help (available once you are in
PowerPoint's VB Editor) as its quite good :)

You can then apply what you have seen and read back in Access!

Happy developing

John
 
B

Bill

Thank you John.

I've been pulled off this project for a couple of days
while shooting a problem elsewhere.

I'll post back with a report in a few days.
Bill
 

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