Copy Unbound OLE Object to New PowerPoint Slde

D

David G.

I have a form with an unbound OLE object which is an MS Graph Chart.
What I would like to do is have the user click a button and:

1. Prompt the user for destination PPT
2. Insert a blank page at the end of the presentation
3. Copy / Transfer the chart to the new slide

I have the first 2 steps done, but I'm unsure of the easiest way to
get the OLE Object from Access to PowerPoint. Has anyone solved this
problem before?
 
D

David G.

Ok I've used the code below in an attempt to copy and paste the OLE
object:

OLE2.SetFocus
OLE2.Action = 4

ppPres.Slides.Paste (ppPres.Slides.Count - 1)

The object is copied to the clipboard, but when the paste occurs I get
this error:

"-2147188160 Slides.Paste: Invalid request. Clipboard is empty or
contains data which may not be pasted here."

If I manually paste the contents of the clipboard, the OLE Object
comes in perfectly, so I must be missing somehting pretty simple here
(at least I hope). One possibility is that the object is copied as an
MS Graph Chart, and I may have to paste special which I don't know how
to do through code.
 
Top