Output to PowerPoint

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an Access 2002 database with forms and reports showing the data from
the database in graphic and tabular format. I then preview the report and
can print it to Adobe Acrobat and get great professional looking output.

Now I need to know how to create the same stuff in PowerPoint slides. Where
can I find discussions, methodologies and examples of doing that?
 
I just spent two days figuring this out. There may be a more elegant
solution, but I am new to this object oriented stuff. You can just create a
new presentation each time, but I wanted to just update the slides. I name
each chart after I paste it to avoid the problems with automatic "Object ##"
scheme.

Private Sub SendtoPowerPoint_Click()
On Error Resume Next
Dim PowerPointObj As Object
Dim C As Integer
Set PowerPointObj = GetObject(, "PowerPoint.Application")
If Err.Number <> 0 Then
Set PowerPointObj = New PowerPoint.Application
End If
PowerPointObj.Visible = True
PowerPointObj.Presentations.Open
FileName:="M:\JRDP_Database\ReserveSupportCharts.ppt", ReadOnly:=msoFalse
PowerPointObj.ActiveWindow.ViewType = ppViewSlide
'Go to first slide
PowerPointObj.ActiveWindow.View.GotoSlide Index:=1
'Delete the "TotalDays" chart object
PowerPointObj.ActivePresentation.Slides(1).Shapes("TotalDays").Select
PowerPointObj.ActiveWindow.Selection.ShapeRange.Delete
'Copy the current TotalDays chart from the form
Form_ReserveSupportCharts.TotalDays.SetFocus
DoCmd.RunCommand acCmdCopy
'Paste the current chart on slide
PowerPointObj.ActivePresentation.Slides(1).Shapes.Paste.Select
PowerPointObj.ActiveWindow.Selection.ShapeRange.Align
msoAlignCenters, True
PowerPointObj.ActiveWindow.Selection.ShapeRange.Align
msoAlignMiddles, True
PowerPointObj.ActiveWindow.Selection.SlideRange.Shapes(1).Name =
"TotalDays"
Set PowerPointObj = Nothing

End Sub
 
There is a detailed article and a couple of KB articles on the MS site
dealing with publishing reports to Snapshot format where the reports
will be updated on a regular basis.


Less complex, would be to embedd the Snapshot ActiveX control, one on
each Slide of your presentation. Setup each control to point to the
propert page of your report.


Another alernative would be to use the ReportUtilities on my site to
publish your Report to a series of Enhanced Metafiles(EMF's), one for
each page of your report. The result is the same as exporting to
Snapshot format. EMF's are directly insertable onto your Slide and are
fully scaleable/resolution independant. You could automate the process
completely with abit of VBA code.
http://www.lebans.com/ReportUtilities.htm

--

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