J
John
Hi there,
I need to make a table of contents from the stories in a series of slides.
Each slide has a single textbox and contains about three or four stories in
the following format:
The Main Header - The rest of the story, The rest of the story, The rest of
the story, The rest of the story, The rest of the story, The rest of the
story, The rest of the story
"The Main Header" is in a different font from all of the other text in the
presentation (including the "The rest of the story, The rest of the story,
The rest of the story, ...." part).
I've written a short bit of code but am unsure of what to do with the
selection bit in particular but also the following chuck it out into a
textbox. Can anyone help.
Thanks
John
Sub MakeContentsTable()
Dim hdrs As Collection
Dim sld As Slide
Dim shp As Shape
Dim newText As String
For Each sld In ActivePresentation.Slides
For Each shp In sld.Shapes
If shp.HasTextFrame = msoTrue Then
'If shp.TextFrame.TextRange.Font
'Select any text that is Arial 10
newText = "" ' selected text
'add new text to hdrs collection
hdrs.Add (newText)
End If
Next shp
Next sld
'add new slide with text box
'add hdrs collection to text box
End Sub
I need to make a table of contents from the stories in a series of slides.
Each slide has a single textbox and contains about three or four stories in
the following format:
The Main Header - The rest of the story, The rest of the story, The rest of
the story, The rest of the story, The rest of the story, The rest of the
story, The rest of the story
"The Main Header" is in a different font from all of the other text in the
presentation (including the "The rest of the story, The rest of the story,
The rest of the story, ...." part).
I've written a short bit of code but am unsure of what to do with the
selection bit in particular but also the following chuck it out into a
textbox. Can anyone help.
Thanks
John
Sub MakeContentsTable()
Dim hdrs As Collection
Dim sld As Slide
Dim shp As Shape
Dim newText As String
For Each sld In ActivePresentation.Slides
For Each shp In sld.Shapes
If shp.HasTextFrame = msoTrue Then
'If shp.TextFrame.TextRange.Font
'Select any text that is Arial 10
newText = "" ' selected text
'add new text to hdrs collection
hdrs.Add (newText)
End If
Next shp
Next sld
'add new slide with text box
'add hdrs collection to text box
End Sub