| | |
VB 6.0 + POWERPOINT automation
![]() |
•
•
Join Date: Feb 2008
Posts: 198
Reputation:
Solved Threads: 0
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
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
![]() |
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Unable to create Link in the Word, using VB6
- Next Thread: access to Datagrid...show in DBGrid
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age application basic beginner birth bmp calculator cd cells.find click client code college component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report save search sendbyte sites sort sql sql2008 sqlserver subroutine tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





