J
John Dumay
Hi all,
I am an Access programmer and i want to display PDF documents created in my
Access application which display custom made graphs in a powerPoint slide(s).
All of my code seems to work fine except that when the PPT is displayed it
displays a Adobe Icon not the document I want it to display. if i do this
manually rather than from code it works fine, so there isn't a problem with
the PDF document I have created.
Also, how do i programmically save the current publication (with a save as
dialogue box preferred) from my Access application?
The code from my Access looks like this (PowerPoint 11 Library is used as a
reference)
Thanks,
John
Private Sub ExportToPowerPoint()
Dim db As Database, rs As Recordset
Dim ppObj As PowerPoint.Application
Dim ppPres As PowerPoint.Presentation
On Error GoTo err_cmdOLEPowerPoint
' Open up an instance of Powerpoint.
Set ppObj = New PowerPoint.Application
Set ppPres = ppObj.Presentations.Add
' Setup a slide and link to the pdf
With ppPres
With .Slides.Add(1, ppLayoutBlank)
.Shapes.AddOLEObject Left:=50, Top:=50, Width:=500, Height:=500,
FileName:=sOutFile, DisplayAsIcon:=msoFalse, Link:=msoTrue
End With
End With
' Run the show.
ppPres.SlideShowSettings.Run
Exit Sub
err_cmdOLEPowerPoint:
MsgBox Err.Number & " " & Err.Description
End Sub
I am an Access programmer and i want to display PDF documents created in my
Access application which display custom made graphs in a powerPoint slide(s).
All of my code seems to work fine except that when the PPT is displayed it
displays a Adobe Icon not the document I want it to display. if i do this
manually rather than from code it works fine, so there isn't a problem with
the PDF document I have created.
Also, how do i programmically save the current publication (with a save as
dialogue box preferred) from my Access application?
The code from my Access looks like this (PowerPoint 11 Library is used as a
reference)
Thanks,
John
Private Sub ExportToPowerPoint()
Dim db As Database, rs As Recordset
Dim ppObj As PowerPoint.Application
Dim ppPres As PowerPoint.Presentation
On Error GoTo err_cmdOLEPowerPoint
' Open up an instance of Powerpoint.
Set ppObj = New PowerPoint.Application
Set ppPres = ppObj.Presentations.Add
' Setup a slide and link to the pdf
With ppPres
With .Slides.Add(1, ppLayoutBlank)
.Shapes.AddOLEObject Left:=50, Top:=50, Width:=500, Height:=500,
FileName:=sOutFile, DisplayAsIcon:=msoFalse, Link:=msoTrue
End With
End With
' Run the show.
ppPres.SlideShowSettings.Run
Exit Sub
err_cmdOLEPowerPoint:
MsgBox Err.Number & " " & Err.Description
End Sub