943,865 Members | Top Members by Rank

Ad:
Nov 27th, 2008
0

VB 6.0 + POWERPOINT automation

Expand Post »
I have given below a code snippet where i am able to generate a ppt with one slide. In a loop the followig code snippet will be passed with new "dbId" and for each "dbId" new slide has to be added in the already existing PPT as extra slides.

Please suggest me how to change this code so as to add the slides in the already generated powerpoint with data generated.

Dim ss As DAO.Recordset
Dim DB As Database
Dim query As String
Set DB = CurrentDb()
query = "select title from tbl_weight_technical where database_id = " & dbId
Set ss = DB.OpenRecordset(query, dbOpenSnapshot)
If ss.RecordCount = 1 Then
Dim path As String
Dim ppApp As Object
Set ppApp = CreateObject("PowerPoint.Application")
path = GetdbPath & "main_pic\template.ppt"
ppApp.Visible = True
Dim ppPres As Object
Set ppPres = ppApp.Presentations.Open(path, False, True, True)
Dim ppSlide1 As Object
Set ppSlide1 = ppPres.Slides(1)
Dim ppShape1 As Object
Reputation Points: 18
Solved Threads: 0
Posting Whiz in Training
dinilkarun is offline Offline
206 posts
since Feb 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Unable to create Link in the Word, using VB6
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: access to Datagrid...show in DBGrid





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC