2016-11-27 49 views

回答

1

你可以在這裏使用此代碼設置大綱級別:

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

枚舉Microsoft.Office.Interop.Word.WdOutlineLevel包含可以設置的所有級別。
(也許你還應該添加一些額外的錯誤處理,以滿足您的需求。)

+0

謝謝我只是提到在段落對象也有outlinelevel,我使用'paragraph.OutlineLevel = WdOutlineLevel.wdOutlineLevel2' –