【发布时间】:2018-09-19 03:52:37
【问题描述】:
我只想用 C# 更新 Powerpoint 中的字符间距,但我不知道该怎么做。我迭代了Slides 和Shapes,但我在Font 中找不到像Word 这样的Spacing 属性。
int slideCount = pprst.Slides.Count;
for (int s = 1; s <= slideCount; ++s )
{
MSPPT.Slide slide = pprst.Slides[s];
int shapeCount = slide.Shapes.Count;
for (int h = 1; h <= shapeCount; ++h)
{
MSPPT.Shape shape = slide.Shapes[h];
MSPPT.TextRange textRange = shape.TextFrame.TextRange;
}
}
【问题讨论】:
-
“字符间距”是指字符之间的间距吗?这也称为“kerning”。
-
In powerpoint VBA, how to change the spacing of a font in a textbox? 的可能重复项。关键是获取
Font2interface 的实例,它具有您需要的Kerning和Spacing属性。 -
非常感谢!这就是我想要的。
标签: c# powerpoint office-interop kerning