【发布时间】:2017-01-13 14:57:19
【问题描述】:
我正在编写 VBA 代码以从 Excel VBA 启动和创建 Power Point 演示文稿。
问题是,我在一些幻灯片中添加了一个文本框,其中包含来自 excel 的文本,并且我已将其配置为具有项目符号。但我的问题是代码将项目符号设置在文本框的所有行中,即使段落之间有空格也是如此。如何将项目符号设置为仅出现在文本之前,而不出现在空格中?
我使用的代码是:
Set pptSlide = pptPres.Slides.Add(10, ppLayoutCustom)
SlideTitle = "Noticias Relevantes"
pptSlide.Shapes.Title.TextFrame.TextRange.Text = SlideTitle
pptSlide.Shapes.Title.TextFrame.TextRange.Font.Size = 22
Set pptTextbox = pptSlide.Shapes(1)
pptTextbox.TextFrame.TextRange.Text = ThisWorkbook.Sheets("PPT").Range("B143").Value
pptTextbox.Top = 83
pptTextbox.TextFrame.TextRange.Paragraphs.ParagraphFormat.Alignment = ppAlignJustify
pd: ppt 是这样的: ImagePPT
【问题讨论】:
标签: vba excel powerpoint