Change font in a textbox object to small caps - Po

2019-08-23 19:32发布

问题:

I can't find anywhere on the internet how to change the font of a textbox to small caps. I've tried many variations of the failing line but can't get it to work. Can someone help?

With objPPTTextbox.TextFrame.TextRange
    .Text = "Title"
    .Font.Size = 14
    .Font2.Smallcaps = msoTrue  ---Fails here!---
    .Font.Name = "Calibri"
    .ParagraphFormat.Alignment = 2
End With

回答1:

Here is the answer thanks to this website

objPPTTextbox.TextFrame2.TextRange.Font.Smallcaps = msoTrue