我正在使用一个小的 VBA 脚本在后台应用一些文本。该脚本在 PowerPoint 2007 和 PowerPoint 2010 上运行良好。
但是,在 PowerPoint 2013 中,设置 Shape.Height 和 Shape.Width 无效。这是代码片段。任何帮助,将不胜感激。
Public Sub applyWatermark()
Dim curDesign As Design
Set curDesign = ActivePresentation.Designs.Item(1)
Dim masterSlide As Master
Set masterSlide = curDesign.SlideMaster
Dim shape As shape
Set shape = masterSlide.Shapes.AddTextbox(msoShapeRectangle, 0#, 0#, 100#, 100#)
shape.TextEffect.Text = "Watermark"
' Setting height and width works fine on PPT 2010 but does not work on PPT 2013
shape.Height = 200
shape.Width = 300
shape.TextFrame2.WordWrap = msoTrue
shape.TextFrame2.WarpFormat = msoWarpFormat1
shape.Left = 200
shape.Top = 200
End Sub