Hi Guy's, i have done some searching and adapting what i can find so far, i am trying add data from Access to Powerpoint, has anyone achieved this or know a solution
I am receiving a Msg object doesn't support this method on this line: pptPres.Slides(i) = rs.Fields("Name") & " - " & rs.Fields("Town") & vbCrLf
Code:
Dim rs As DAO.Recordset Dim pptApp As New PowerPoint.Application
Dim pptPres As PowerPoint.Presentation
Dim sFile As String
Dim currentSlide As Slide
Dim i As Integer
sFile = "C:\Users\davem\Desktop\Driver.pptx"
Set rs = CurrentDb.OpenRecordset("Query28")
Set pptPres = pptApp.Presentations.Open(sFile)
For i = 1 To pptPres.Slides.Count
Set currentSlide = pptPres.Slides(i)
Do Until rs.EOF
pptPres.Slides(i) = rs.Fields("Name") & " - " & rs.Fields("Town") & vbCrLf
rs.MoveNext
Loop
Debug.Print pptPres
Next
Set currentSlide = Nothing
pptPres.Close
Set pptPres = Nothing
pptApp.Quit
Set pptApp = Nothing
Application.FollowHyperlink sFile