code to either auto wrap text box or start new one

J

job

I have code that I'm writing that puts slides into ppt from excel. After
which and I'm creating an index of the pages added. The problem is that I
usually add a lot of items so the text box I'm adding the list of items to
gets too long. Even though I have the textbox set to wrap it still
continues.

Here is where it is built:

For Each oSld In PPApp.ActivePresentation.Slides
' Does the slide have title placeholder?
If oSld.Shapes.HasTitle Then
' Get the reference to the title shape on the slide
'Set oShp = oSld.Shapes.Title
'Check if the placeholder has any text in it.
If oSld.Shapes.Title.TextFrame.TextRange.Text = "" Then
oAgenda = oAgenda & _
" ~Slide " & oSld.SlideIndex & Chr(13)
Else
oAgenda = oAgenda & _
oSld.Shapes.Title.TextFrame.TextRange.Text &
Chr(13)
End If
Else
oAgenda = oAgenda & _
" ~Slide " & oSld.SlideIndex & Chr(13)
End If
a = a + 1

Next oSld

I thought of doing something like when a = 38 then
start a new text box and continue with the building of the list..

Any ideas?
 
J

Job

job said:
I have code that I'm writing that puts slides into ppt from excel. After
which and I'm creating an index of the pages added. The problem is that I
usually add a lot of items so the text box I'm adding the list of items to
gets too long. Even though I have the textbox set to wrap it still
continues.

Here is where it is built:

For Each oSld In PPApp.ActivePresentation.Slides
' Does the slide have title placeholder?
If oSld.Shapes.HasTitle Then
' Get the reference to the title shape on the slide
'Set oShp = oSld.Shapes.Title
'Check if the placeholder has any text in it.
If oSld.Shapes.Title.TextFrame.TextRange.Text = "" Then
oAgenda = oAgenda & _
" ~Slide " & oSld.SlideIndex & Chr(13)
Else
oAgenda = oAgenda & _
oSld.Shapes.Title.TextFrame.TextRange.Text &
Chr(13)
End If
Else
oAgenda = oAgenda & _
" ~Slide " & oSld.SlideIndex & Chr(13)
End If
a = a + 1

Next oSld

I thought of doing something like when a = 38 then
start a new text box and continue with the building of the list..

Any ideas?
 

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