Copy Unbound OLE Object to New PowerPoint Slde

  • Thread starter Thread starter David G.
  • Start date Start date
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?
 
The simplest method would be to transfer the Image via the Clipboard.
Me.NameOfOLEObjectFrame.SetFocus
Me.NameOfOLEObjectFrame.Action = 4

' Set the focus back to your PP slide
' Issue a command to Paste

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
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.
 
You may have to repost this question in a PowerPoint NG. Let me know how
you make out.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
Back
Top