Results 1 to 3 of 3
  1. #1
    DMT Dave is offline VIP
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1,195

    Adding Data From Access To Powerpoint

    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

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,938
    No idea Dave TBH, but YouTube has plenty of videos? https://www.youtube.com/watch?v=nuPDDfLjOBM
    However just looking at your code, you put all the recordset in the first slide and nothing in the others?

    Plus what is the point of CurrentSlide?, you do nothing with it?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #3
    DMT Dave is offline VIP
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1,195
    WGM, thank you for spotting my silly error

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Access delivery from within Powerpoint?
    By vicsaccess in forum Access
    Replies: 1
    Last Post: 07-22-2016, 08:06 AM
  2. Access Form to Powerpoint
    By Thompyt in forum Import/Export Data
    Replies: 3
    Last Post: 12-19-2014, 08:03 PM
  3. Access Reports into Powerpoint
    By karthik in forum Reports
    Replies: 1
    Last Post: 11-28-2014, 11:36 AM
  4. insert a powerpoint presentation into access
    By ecalvert47462 in forum Access
    Replies: 3
    Last Post: 12-04-2012, 02:09 PM
  5. Exporting data to powerpoint
    By sharmaprashant22 in forum Import/Export Data
    Replies: 0
    Last Post: 05-03-2011, 12:28 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums