thechazm
VBA, VB.net, C#, Java
- Local time
- Today, 08:03
- Joined
- Mar 7, 2011
- Messages
- 515
Hello all,
I have been doing research for a while now and while there seems to be plenty of information on how to create a power point slide from access 2003 or earlier, I can't seem to find any reference for Access 2007.
The difference is how the slide is created between the two versions and I can't seem to nail down what I am doing wrong. It error's out with a 424 error code during trying to create the slide. If anyone can offer any guidance I would greatly appreciate it.
I have been doing research for a while now and while there seems to be plenty of information on how to create a power point slide from access 2003 or earlier, I can't seem to find any reference for Access 2007.
The difference is how the slide is created between the two versions and I can't seem to nail down what I am doing wrong. It error's out with a 424 error code during trying to create the slide. If anyone can offer any guidance I would greatly appreciate it.
Code:
Function testppt()
Dim ppApp As PowerPoint.Application, ppPres As PowerPoint.Presentation, i As Long, qry As QueryDef, ppSlide As PowerPoint.Slide
i = 1
Set ppApp = New PowerPoint.Application
Set ppPres = ppApp.Presentations.Add
ppPres.Slides.AddSlide 1, pptlayout
' With .Slides.AddSlide(1, pptLayout) = "test"
For Each qry In CurrentData.AllQueries
ppPres.Slides(1).Shapes.AddShape(msoShapeRectangle, 1, i + 10, Len(qry.Name), 30) = qry.Name
Next qry
' End With
'End With
ppApp.Visible = msoTrue
End Function