我是一名自由职业的Java程序员,第一次被要求在PowerPoint上进行一些VBA编程,我有点挣扎。
我已经创建了一个按钮,该按钮会触发幻灯片的创建(此方法有效)。 在这张新幻灯片上,我想创建一个activeX文本框(在“演示”模式下可以使用的文本框之一),但是我只能创建“标准” PowerPoint文本框。
我确信这是一个非常简单的命令,但是我在任何地方都找不到。.
这是我正在使用的代码。有人可以帮我吗? 谢谢!
Public Sub addContentToSatelliteSlide()
currentSlide = activePresentation.SlideShowWindow.View.Slide.SlideIndex
'CURRENT SLIDE ON SLIDESHOW
With activePresentation.Slides(currentSlide + 1).Shapes
With .AddTextbox(msoTextOrientationHorizontal,160,80,400,400).TextFrame
.textrange.Text = "add informatiom here"
.textrange.Paragraphs.ParagraphFormat.Alignment = ppAlignLeft
.textrange.Font.Color = RGB(255,255,255)
.textrange.Font.Size = 11
.textrange.Font.Name = "Arial"
.textrange.Font.Bold = False
.textrange.Font.Color = RGB(0,0) 'BLACK
End With
End With
End Sub