问题
Do you know what the command in VBA is in order to space out some text? I looked on the internet and didn't find anything that would work.
this "SOMMAIRE" textbox has no spacing
and this, is what I want that textbox to look like :
there is more space in between the letters
more exactly, I am looking for the VBA code for this exact button :
回答1:
Use the shape's .TextFrame2.TextRange.Font.Spacing
property. By default it is probably 0
. You can change it to other values to increase the font spacing.
回答2:
Just wanted to add that auto-kerning is also a factor so you'll want to remove that too:
'Set character point spacing to zero
.TextFrame2.TextRange.Font.Spacing = 0
'Remove automatic kerning
.TextFrame2.TextRange.Font.Kerning = False
The kerning property can be viewed manually if you select the shape and in the Font group on the HOME ribbon, click the notch in the bottom right and then go to the Character Spacing tab - you will see a checkbox there where this property is set.
来源:https://stackoverflow.com/questions/32846510/in-powerpoint-vba-how-to-change-the-spacing-of-a-font-in-a-textbox