views:

135

answers:

1

I have some VB that copies OLEobjects into powerpoint automatically for me. The purpose of this is that my database runs queries, and then forms turn them into charts. As it runs through the various queires/form on open/close events the charts are added to a powerpoint presentation.

I also have parallel queries that show the resulting data in datasheet form, and I was wondering if there is a way to turn that into an OLE object (like the charts) so that I can have this thing automatically add these to the powerpoint to.

The basic idea is that I am copying and pasting into the notes section of the powerpoint for each relative slide (chart w/data), and I am wondering if there is a better way to do it?

The reason I ask about this "OLE idea/method" is that the OLEobject = copy is the only way I have been able to get this thing to automate the powerpoint side of it (or, it's the only way I know how to do it).

Any advice is always appreciated!

+1  A: 

I guess you could use code like this:

DoCmd.OpenForm "FormName", acFormDS

DoCmd.RunCommand acCmdSelectAllRecords

DoCmd.RunCommand acCmdCopy

Then paste as a table into PowerPoint.

Another option would be to open a recordset object and build a Table filling in the cells.

Please see this MSDN link with an example

Mark3308
thanks. i actually have looked at that code before (i mean the link provided), and applied it to my database. the problem with that I am just learning visual basic, and only been using access at work for a little less than a year now (i kind of got tossed into managing 4 different ones). but i have learned a lot. that would be an awesome example for me to use, but I am not good with ppt vba yet, and do not know how to format/place text boxes where I want them.I did try the example above that you provided and it worked better! I can work them into my code and ...
Justin
just paste a data table on the following slide. What I need is this dataset to be in the "notes" section of the relative chart slide, but this gets me much close than copy/paste individual ones (there are 64 so...).all that being said...Thanks!
Justin