标签: c# ms-word vsto
我尝试使用Vsto C#
答案 0 :(得分:1)
您可以在此处使用此代码设置大纲级别:
Application.ActiveDocument.Styles["MyStyle"].ParagraphFormat.OutlineLevel = WdOutlineLevel.wdOutlineLevel2;
枚举Microsoft.Office.Interop.Word.WdOutlineLevel包含可以设置的所有级别 (也许您还应该添加一些符合您需求的额外错误处理。)
Microsoft.Office.Interop.Word.WdOutlineLevel