I would like to pass the data from vb to create a powerpoint presentation dynamically(through Coding). The data is stored in the database. The user must be able to save the presentation which got data from the database.
: I would like to pass the data from vb to create a powerpoint presentation dynamically(through Coding). The data is stored in the database. The user must be able to save the presentation which got data from the database. : : Please help me with this. : Hi, you can open powerpoint presentation in similar way as any other office document.. (Add reference to Office library into your project) [code] Dim iPwpt As PowerPoint.Presentation Set iPwpt = PowerPoint.Presentations.Open("C:p.ppt") [/code] and you can access this presentation from your app (you can get to slides via iPwpt.Slide(SlideIndex) and modify them).
I was not able to make reference to office library on this computer so I'm not sure if PowerPoint is the correct name .. (You can find it in object explorer.. (F2))
: : I would like to pass the data from vb to create a powerpoint presentation dynamically(through Coding). The data is stored in the database. The user must be able to save the presentation which got data from the database. : : : : Please help me with this. : : : Hi, : you can open powerpoint presentation in similar way as any other office document.. (Add reference to Office library into your project) : [code] : Dim iPwpt As PowerPoint.Presentation : Set iPwpt = PowerPoint.Presentations.Open("C:p.ppt") : [/code] : and you can access this presentation from your app (you can get to slides via iPwpt.Slide(SlideIndex) and modify them). : : I was not able to make reference to office library on this computer so I'm not sure if PowerPoint is the correct name .. (You can find it in object explorer.. (F2)) : : Hope this heps : : [blue][b][italic][size=4]P[/size]avlin [size=4]II[/italic][/size][/b][/blue] : : [purple]Don't take life too seriously anyway you won't escape alive from it![/purple] : : :
Thanks for the code.
But I would like to dynamically add the slides and data present in the slides. Please tell me how to do that.
: : : I would like to pass the data from vb to create a powerpoint presentation dynamically(through Coding). The data is stored in the database. The user must be able to save the presentation which got data from the database. : : : : : : Please help me with this. : : : : : Hi, : : you can open powerpoint presentation in similar way as any other office document.. (Add reference to Office library into your project) : : [code] : : Dim iPwpt As PowerPoint.Presentation : : Set iPwpt = PowerPoint.Presentations.Open("C:p.ppt") : : [/code] : : and you can access this presentation from your app (you can get to slides via iPwpt.Slide(SlideIndex) and modify them). : : : : I was not able to make reference to office library on this computer so I'm not sure if PowerPoint is the correct name .. (You can find it in object explorer.. (F2)) : : : : Hope this heps : : : : [blue][b][italic][size=4]P[/size]avlin [size=4]II[/italic][/size][/b][/blue] : : : : [purple]Don't take life too seriously anyway you won't escape alive from it![/purple] : : : : : : : : : : : Thanks for the code. : : But I would like to dynamically add the slides and data present in the slides. Please tell me how to do that. : : Thanks in advance : : : Hi, let's say pp is your powerpoint presentation object.. [code] Dim pp As Presentation, s As Slide Set pp = ... [green]'Your new or opened document[/green] Set s = pp.Slides.Add(pp.Slides.Count + 1, ppLayoutText) [green]'Add slide at the end[/green] s.Shapes(1).TextFrame.TextRange.Text = "asdf" s.Shapes(2).TextFrame.TextRange.Text = "fdsa" [/code]You can access parts of your slide by Slides collection. It contains all text-areas, images, graphs and others objects on the slide so you can modify them in this way.. You can also copy/paste slides to save your graphic layout etc..
Comments
:
: Please help me with this.
:
Hi,
you can open powerpoint presentation in similar way as any other office document.. (Add reference to Office library into your project)
[code]
Dim iPwpt As PowerPoint.Presentation
Set iPwpt = PowerPoint.Presentations.Open("C:p.ppt")
[/code]
and you can access this presentation from your app (you can get to slides via iPwpt.Slide(SlideIndex) and modify them).
I was not able to make reference to office library on this computer so I'm not sure if PowerPoint is the correct name .. (You can find it in object explorer.. (F2))
Hope this heps
[blue][b][italic][size=4]P[/size]avlin [size=4]II[/italic][/size][/b][/blue]
[purple]Don't take life too seriously anyway you won't escape alive from it![/purple]
: :
: : Please help me with this.
: :
: Hi,
: you can open powerpoint presentation in similar way as any other office document.. (Add reference to Office library into your project)
: [code]
: Dim iPwpt As PowerPoint.Presentation
: Set iPwpt = PowerPoint.Presentations.Open("C:p.ppt")
: [/code]
: and you can access this presentation from your app (you can get to slides via iPwpt.Slide(SlideIndex) and modify them).
:
: I was not able to make reference to office library on this computer so I'm not sure if PowerPoint is the correct name .. (You can find it in object explorer.. (F2))
:
: Hope this heps
:
: [blue][b][italic][size=4]P[/size]avlin [size=4]II[/italic][/size][/b][/blue]
:
: [purple]Don't take life too seriously anyway you won't escape alive from it![/purple]
:
:
:
Thanks for the code.
But I would like to dynamically add the slides and data present in the slides. Please tell me how to do that.
Thanks in advance
: : :
: : : Please help me with this.
: : :
: : Hi,
: : you can open powerpoint presentation in similar way as any other office document.. (Add reference to Office library into your project)
: : [code]
: : Dim iPwpt As PowerPoint.Presentation
: : Set iPwpt = PowerPoint.Presentations.Open("C:p.ppt")
: : [/code]
: : and you can access this presentation from your app (you can get to slides via iPwpt.Slide(SlideIndex) and modify them).
: :
: : I was not able to make reference to office library on this computer so I'm not sure if PowerPoint is the correct name .. (You can find it in object explorer.. (F2))
: :
: : Hope this heps
: :
: : [blue][b][italic][size=4]P[/size]avlin [size=4]II[/italic][/size][/b][/blue]
: :
: : [purple]Don't take life too seriously anyway you won't escape alive from it![/purple]
: :
: :
: :
:
:
:
:
: Thanks for the code.
:
: But I would like to dynamically add the slides and data present in the slides. Please tell me how to do that.
:
: Thanks in advance
:
:
:
Hi,
let's say pp is your powerpoint presentation object..
[code] Dim pp As Presentation, s As Slide
Set pp = ... [green]'Your new or opened document[/green]
Set s = pp.Slides.Add(pp.Slides.Count + 1, ppLayoutText) [green]'Add slide at the end[/green]
s.Shapes(1).TextFrame.TextRange.Text = "asdf"
s.Shapes(2).TextFrame.TextRange.Text = "fdsa"
[/code]You can access parts of your slide by Slides collection. It contains all text-areas, images, graphs and others objects on the slide so you can modify them in this way..
You can also copy/paste slides to save your graphic layout etc..
[blue][b][italic][size=4]P[/size]avlin [size=4]II[/italic][/size][/b][/blue]
[purple]Don't take life too seriously anyway you won't escape alive from it![/purple]