Programmaticaly inserting a bitmap on a PPT slide

P

Primoz Bradac

I'm using Office 2003 and automating PPT from Access. Actually I'm
creating a presentation: each slide should represent the contents of a
record from an Access table.

I use ADODB to retrieve the recordset and then put the text fields on a
slide with Layout = ppLayoutTextAndObject.
(I assume this is correct to have a Title, text box on the left under it
and a picture to the right)

I have no difficulty putting the text fields of each record onto a slide
with e.g.:

oSlide.Shapes(2).TextFrame.TextRange.Text = rst.Fields("Name")

(Note: oSlide.Shapes(1) is the Title shape of the slide!)

The problem is I'cant figure out how to put a bitmap from a field in the
recordset which is OLEObject on the third shape of each slide. Actually
I'm looking for the property following:

oSlide.Shapes(3).<what comes here?> = rst.Fields("BitmapPicture")

Can anybody give any advice?

TIA,
Primoz
 
S

Smriti

There is a OLEFormat property of the class Shape. Maybe you
could use that. The OLEFormat object returned by this
property has an object property to which the image object
can be assigned.

Hope that helps...
Smriti
 

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