如何以编程方式设置大纲级别

How to set Outline Level programmatically

我尝试使用 Vsto C# 从代码后面以编程方式为列表设置大纲级别

您可以在此处使用此代码设置大纲级别:

Application.ActiveDocument.Styles["MyStyle"].ParagraphFormat.OutlineLevel =
    WdOutlineLevel.wdOutlineLevel2;

枚举Microsoft.Office.Interop.Word.WdOutlineLevel包含所有可以设置的级别。
(也许您还应该添加一些适合您需要的额外错误处理。)