Inserting Embed Viso Drawing From access Table into Power Point

G

Gary

I have a table with a field setup as an oleobject into which I insert a
standard visio template.

How can I take this OLE field from the table and create a power point side
from it?

I have inserted jpg pictures into power point with the following:

Dim oPPT As PowerPoint.Application
Dim oPres As Presentation

Set oPPT = New PowerPoint.Application
Set oPres = oPPT.Presentations.Add(True)

oPres.Slides.Add(oPres.Slides.Count+1, ppLayoutBlank).Shapes.AddPicture
"c:\junk\dsc_0010.jpg", False, True, 10, 10

oPres.SaveAs "c:\documents and settings\ec925b\my
documents\junk\def\testppt.ppt", ppSaveAsPresentation, True

oPres.Close
Set oPres = Nothing
oPPT.Quit
Set oPPT = Nothing


There is a command called AddOLEObject

oPres.Slides.Add(oPres.Slides.Count + 1, ppLayoutBlank).Shapes.AddOLEObject
Left:=100, Top:=100, Width:=150, Height:=50,
classname:="Forms.CommandButton.1"

This works, but the problem is How do I associate the OLEObject in the Table
to be added to the power point???

I would appreciate any help!

Thanks,

G
 
G

Gary

Need additional help here.

1) Since the embed OLEObject is a field on my table, do I need to activate
the field first?? before I can use oPres.Slides.Add(oPres.Slides.Count +1,
ppLayoutBlank).Shapes.AddObject ?? If I activate it first, how do I specify
to the AddObject command where it is??

2) There are two ways to indicate where the object is: a) ClassName and b)
FileName parameter. Since these embed objects are in a table, I don't know
how to specify a filename. Is there a ClassName which I can use to specify a
form or a table field to use???

3) There was a article "How to load OLE objects from a folder into a
table". They used a bound object on a form and added the OLE Object into the
table. Do I have to reverse the process?? Take the table, activate the OLE
field for record 1 and save it to a dummy file and then do the AddObject??
Then repeat.

Additional help is deeply appreciated.

Thanks,

G
 

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