0
votes

I have the following code snippet to add a slide to the end of a Microsoft PowerPoint presentation and designate a title / subtitle:

longSlideCount = ActivePresentation.Slides.Count

With ActivePresentation.Slides
    Set slideObject = .Add(longSlideCount + 1, ppLayoutTitle)
End With

' ------------------------------ make the main title ------------------------------------- '

slideObject.Shapes(1).TextFrame.TextRange.Text = "This is the Main Title Text"
slideObject.Shapes(2).TextFrame.TextRange.Text = "This is the SubTitle Text"

Is it possible to shrink / grow the text in the title string to fit on one line in the text frame?

1
have you tried to record a macro and walk through the code trying to pick up the line responsible for text modification?user2140173
a good suggestion, unfortunately I only have PowerPoint 2010, which to my knowledge does not allow macro recording :(HotDogCannon

1 Answers

0
votes

Use .Textframe2.Autosize = msoAutoSizeTextToFitShape