adding x lines of text, then adding new slide, etc

  • Thread starter Thread starter Silvester
  • Start date Start date
S

Silvester

On a command button click event I use PP automation from Access 2000 to
generate a new slideshow with text from a A2000 form textbox (enter = new
line in field)

Dim ppSlide1 As PowerPoint.Slide
Set ppSlide1 = ppPres.Slides.Add(1, ppLayoutText)

Right now at font size 24, nine lines of text fit in the standard PP slide
textbox under the title.

How can I get powerpoint to add keep adding a new slide for every nine lines
of text so that the slideshow builds itself to fit the text.

Thanks for any help.
 
While this sounds really complex, it really isn't.

Simply create the entire slideshow from Access. Then loop through the
slides looking for textframes that contain more than 9 lines. Then it's
just a matter of inserting a duplicate slide with the overflow text lines.

Post back if you run into trouble with your code.

--
Bill Dilworth, Microsoft PPT MVP
===============
Please spend a few minutes checking vestprog2@
out www.pptfaq.com This link will yahoo.
answer most of our questions, before com
you think to ask them.

Change org to com to defuse anti-spam,
ant-virus, anti-nuisance misdirection.
..
..
 
On a command button click event I use PP automation from Access 2000 to
generate a new slideshow with text from a A2000 form textbox (enter = new
line in field)

Dim ppSlide1 As PowerPoint.Slide
Set ppSlide1 = ppPres.Slides.Add(1, ppLayoutText)

Right now at font size 24, nine lines of text fit in the standard PP slide
textbox under the title.

How can I get powerpoint to add keep adding a new slide for every nine lines
of text so that the slideshow builds itself to fit the text.

.Lines.Count will tell you how many lines PowerPoint has made of the text
you've added. With a reference to the shape you're adding text to you can do
this:

While oShape.TextFrame.TextRange.Lines.Count < 9
' add more text from your source
Wend

I'd consider adding text a word at a time; if you add more, you might end up
with PPT breaking it differently than you expect and get more than 9 lines.

Thanks for any help.

--
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
Featured Presenter, PowerPoint Live 2004
October 10-13, San Diego, CA www.PowerPointLive.com
================================================
 
Back
Top