|
如题,如何使用vba将文本框或图片居中
我是这样写的,.TextFrame2.HorizontalAnchor = msoAnchorCenter 无效
Set newSlide = pptthis.slides.Add(2, 12)
With newSlide.Shapes.AddTextbox(msoTextOrientationHorizontal, 200, 230, 700, 100)
' .TextFrame.TextRange.Font.Color = vbRed
.TextFrame.TextRange.Text = “pptname”
.TextFrame.TextRange.Font.Size = 40
' .TextFrame.TextRange.Font.name = "微软雅黑"
' .TextFrame.TextRange.Font.NameAscii = "微软雅黑"
' .TextFrame.TextRange.Font.NameOther = "微软雅黑"
.TextFrame.TextRange.Font.NameFarEast = "微软雅黑"
.TextFrame.TextRange.Font.Bold = msoTrue
.TextFrame.HorizontalAnchor = msoAnchorCenter
.TextFrame2.HorizontalAnchor = msoAnchorCenter
End With |
|