0
有没有办法在PowerPoint中创建VSTO样式设置文本格式,类似于什么是可能的Word文档的内容:创建自定义样式
// document is of type Microsoft.Office.Interop.Word.Document
Style sectionHeadingExt = document.Styles.Add("myStyle");
sectionHeadingExt.set_BaseStyle(SectionHeadingInt);
sectionHeadingExt.Font.Size = 14;
sectionHeadingExt.Font.Color = WdColor.wdColorBlack;
sectionHeadingExt.Font.Bold = (int)MsoTriState.msoFalse;
sectionHeadingExt.ParagraphFormat.LineSpacingRule = WdLineSpacing.wdLineSpaceMultiple;
sectionHeadingExt.ParagraphFormat.LineSpacing = _application.LinesToPoints((float)1.11);
sectionHeadingExt.ParagraphFormat.SpaceBefore = 0;
sectionHeadingExt.ParagraphFormat.SpaceAfter = 0;
我需要创建一个自定义的功能区选项卡,添加一个按钮有,并且当按钮被点击我需要相应地格式化选定的段落:
GetCurrentParagraph().set_Style("myStyle");
我这样做是在Word插件,但有可能与PowerPoint?我也看不到样式/更改样式 PowerPoint中的选项(在Word中他们出现在主页选项卡上)。
谢谢。有没有办法在PowerPoint幻灯片中访问所选文本或活动段落等内容?还有如何将样式(如粗体,缩进等)应用于该文本? – dragonfly