I do something very similar to this in Example 7.8 on my site
(
http://www.PowerfulPowerPoint.com). I don't access the PowerPoint
externally; I do that from within the PowerPoint, but once you have a
slide object, it is basically the same. Note that in the slide, Shape(1)
is the title, and Shape(2) is the bulleted text area. We can be
completely confident of this because you just added the slide yourself
(if you were working from an existing slide, you would need all kinds of
error-checking to make sure it had a title area and a text area).
pptSlide.Shapes(1).TextFrame.TextRange.Text = _
"Your Title"
pptSlide.Shapes(2).TextFrame.TextRange.Text = _
"Your First Bullet Point" & Chr$(13) & _
"Your Second Bullet Point" & Chr$(13) & _
"Your Third Bullet Point & Chr$(13)
--
David M. Marcovitz
Microsoft PowerPoint MVP
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
=?Utf-8?B?SmltbXk=?= <(E-Mail Removed)> wrote in
news:A19FDD5A-C951-462B-B088-(E-Mail Removed):
> I am currently within an MS Office application and I have calculated
> many text items assigned to string variables in VBA.
>
> What I want to do is wake up PowerPoint and place these text items as
> bullets on a slide. I also want to be able to specify the slide title
> block.
>
> Here is what I have so far. It wakes up PPT and makes a slide for me.
> Now, I want to add text to this new slide:
>
> Public Sub MakeSlide() 'from VBA window
> Dim ppt As Object
> Dim pptPres As Presentation
> Dim pptSlide As Slide
> Set ppt = New PowerPoint.Application
> Set pptPres = ppt.Presentations.Add(True)
> pptPres.Slides.Add 1, ppLayoutText 'Adds slide #1
> Set pptSlide = pptPres.Slides.Item(1)
> With pptslide
> 'What goes here????
> ' I need a title for my slide, let's call it myTitle
> 'I need to add bullets: Bullet1, Bullet2, Bullet3, etc.
> End With
>
> ppt.Visible = True
> End Sub
>
> Thank you in advance for you assistance.
>