In powerpoint VBA, how to change the spacing of a font in a textbox?

自闭症网瘾萝莉.ら 提交于 2019-12-07 23:43:28

问题


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

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