Is it possible to use Microsoft.Office.Interop.Word to programatically remove line numbering from a Word document?

大兔子大兔子 提交于 2019-12-08 05:23:30

问题


I would like to use Microsoft.Office.Interop.Word to programatically remove all line numberings from a Word document. (How) is it possible?

Should I use the LineNumbering interface?


回答1:


Line numbering is an document- or section-level setting, and it's controlled over the PageSetup object. To simply turn it off throughout the document:

Word.Document doc = wdApp.ActiveDocument;
doc.PageSetup.LineNumbering.Active = false;


来源:https://stackoverflow.com/questions/49496067/is-it-possible-to-use-microsoft-office-interop-word-to-programatically-remove-li

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!