我有以下代码段将幻灯片添加到Microsoft PowerPoint演示文稿的末尾并指定标题/副标题:
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"
是否可以缩小/增长标题字符串中的文本以适合文本框架中的一行?
答案 0 :(得分:0)
使用.Textframe2.Autosize = msoAutoSizeTextToFitShape