Textbox with rounded corners using VBA

让人想犯罪 __ 提交于 2019-12-11 09:19:29

问题


I have a predefined textbox in a PowerPoint slide, I need to make its corners rounded. Is there any way I can do this using VBA?


回答1:


This example assumes that the shape you're after is the third shape on slide 1. Adjust accordingly:

Sub Test()
Dim oSh As Shape
Set oSh = ActivePresentation.Slides(1).Shapes(3)
With oSh
    .AutoShapeType = msoShapeRoundedRectangle
    .Adjustments(1) = 0.25
End With
End Sub

It converts the textbox to a rounded rectangle then sets the corners to be rounded. As far as I know, you cannot round the corners of a regular text box.



来源:https://stackoverflow.com/questions/23131654/textbox-with-rounded-corners-using-vba

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!