Slide's Title

M

Marko

Hi to all,
i have an applicatione that use office automation to convert a ppt
presentatio in html format.
I nedd to obtain the title of the slide; the same printed in powerpoint and
in the realtive html frameset.
When i try to deduce it with thi code

For Each aSlide In ppPres.Slides
titleArray.Add (aSlide.Name)
Next
i receive a title like : "Slide1", "Slide 2"

How can i do it?

Thanx for your attention
Mark
 
S

Steve Rindsberg

Hi to all,
i have an applicatione that use office automation to convert a ppt
presentatio in html format.
I nedd to obtain the title of the slide; the same printed in powerpoint and
in the realtive html frameset.
When i try to deduce it with thi code

For Each aSlide In ppPres.Slides
titleArray.Add (aSlide.Name)
Next
i receive a title like : "Slide1", "Slide 2"

How can i do it?

Iterate through each slide's shapes collection.

Function GetTitle(ByRef MySlide As Slide) As String
Dim sh As Shape
GetTitle = "" ' by default
For Each sh In MySlide.Shapes
If sh.Type = msoPlaceholder _
And sh.HasTextFrame _
And sh.TextFrame.HasText Then

Select Case sh.PlaceholderFormat.Type
' Title
Case Is = ppPlaceholderTitle, _
ppPlaceholderCenterTitle, _
ppPlaceholderVerticalTitle
GetTitle = sh.TextFrame.TextRange.Text
Exit Function
Case Else
End Select

End If
Next sh
End Function
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top