Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-05-2015, 02:35 PM
Thompyt Thompyt is offline Access/PPT VBA difficulties Windows 8 Access/PPT VBA difficulties Office 2010 64bit
Novice
Access/PPT VBA difficulties
 
Join Date: Mar 2015
Location: El Paso, TX
Posts: 8
Thompyt is on a distinguished road
Default Access/PPT VBA difficulties

I am starting out with the following code for PPT interface. I get it to open, display a title and a field, but it makes a new slide each time. I can change the while next loop so that only the Field changes and 1 slide is made. BUT the field swaps until it gets to EOF. I would like it to insert a new line for each record. I would like to have 5 fields to insert.



Title
Levels
CR_No
Change Requested
Status

Code:
Sub cmdPPT_Click()
    Dim db As Database, rs As Recordset
    Dim ppObj As PowerPoint.Application
    Dim ppPres As PowerPoint.Presentation
 
    On Error GoTo err_cmdOLEPowerPoint
 
    Set db = CurrentDb
    Set rs = db.OpenRecordset("Copy of Weekly Closed", dbOpenDynaset)
 
    Set ppObj = New PowerPoint.Application
    Set ppPres = ppObj.Presentations.Add
 
    With ppPres
        With .Slides.Add(rs.AbsolutePosition + 1, ppLayoutTitle)
                .Shapes(1).TextFrame.TextRange.Text = CStr(rs.Fields("[Levels]").Value)
                .Shapes(1).TextFrame.TextRange.Characters.Font.Size = 30
        While Not rs.EOF
                .Shapes(2).TextFrame.TextRange.Text = CStr(rs.Fields("[Closed]").Value)
           rs.MoveNext
        Wend
    Exit Sub
err_cmdOLEPowerPoint:
    MsgBox Err.Number & " " & Err.Description
    End With
    End With
End Sub
I am trying to make the below example on PPT:

Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Access/PPT VBA difficulties Difficulties with bullets in Word Cityroller Word 1 02-24-2015 07:15 PM
Random number difficulties ahrinn Word 12 08-01-2012 01:04 PM
Access 2007 Upgrade After Initial Install - Access 2003 Won't Remove wcb Office 1 01-25-2010 04:08 AM
Access/PPT VBA difficulties Can Access access folders & sub-folders and dig out data? nrg Office 4 06-20-2005 11:09 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:22 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft