P
pib311 via AccessMonster.com
Hello all,
Thanks for your help in advance.
I am trying to figure out how to use Access to kick out one slide to a pre-
existing template. The template includes company headers and the like that
need to be in place. I have a table with data that I would like to export to
Powerpoint and Can only do so right now in a new project. Also, I am having
trouble with selecting a blank layout.
The code below works to create brand new presentation. I need to open one
without a layout selected.
Private Sub cmd_powerpoint_Click()
Dim db As Database, rs As Recordset
Dim ppObj As PowerPoint.Application
Dim ppPres As PowerPoint.Presentation
On Error GoTo err_cmdOLEPowerPoint
' Open up a recordset on the Employees table.
Set db = CurrentDb
Set rs = db.OpenRecordset("projects", dbOpenDynaset)
' Open up an instance of Powerpoint.
Set ppObj = New PowerPoint.Application
' would imagine something goes here to select a template
Set ppPres = ppObj.Presentations.Add
' Setup the set of slides and populate them with data from the
' set of records.
With ppPres
While Not rs.EOF
With .Slides.Add(rs.AbsolutePosition + 1, ppLayoutText)
.Shapes(1).TextFrame.TextRange.Text = rs.Fields("Project")
.Shapes(2).TextFrame.TextRange.Text = rs.Fields("inclusion")
.SlideShowTransition.EntryEffect = ppEffectFade
End With
rs.MoveNext
Wend
End With
Thanks for your help in advance.
I am trying to figure out how to use Access to kick out one slide to a pre-
existing template. The template includes company headers and the like that
need to be in place. I have a table with data that I would like to export to
Powerpoint and Can only do so right now in a new project. Also, I am having
trouble with selecting a blank layout.
The code below works to create brand new presentation. I need to open one
without a layout selected.
Private Sub cmd_powerpoint_Click()
Dim db As Database, rs As Recordset
Dim ppObj As PowerPoint.Application
Dim ppPres As PowerPoint.Presentation
On Error GoTo err_cmdOLEPowerPoint
' Open up a recordset on the Employees table.
Set db = CurrentDb
Set rs = db.OpenRecordset("projects", dbOpenDynaset)
' Open up an instance of Powerpoint.
Set ppObj = New PowerPoint.Application
' would imagine something goes here to select a template
Set ppPres = ppObj.Presentations.Add
' Setup the set of slides and populate them with data from the
' set of records.
With ppPres
While Not rs.EOF
With .Slides.Add(rs.AbsolutePosition + 1, ppLayoutText)
.Shapes(1).TextFrame.TextRange.Text = rs.Fields("Project")
.Shapes(2).TextFrame.TextRange.Text = rs.Fields("inclusion")
.SlideShowTransition.EntryEffect = ppEffectFade
End With
rs.MoveNext
Wend
End With