是否可以使用Microsoft.Office.Interop.Word以编程方式从Word文档中删除行号? [英] Is it possible to use Microsoft.Office.Interop.Word to programatically remove line numbering from a Word document?
本文介绍了是否可以使用Microsoft.Office.Interop.Word以编程方式从Word文档中删除行号?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想使用Microsoft.Office.Interop.Word以编程方式
I would like to use Microsoft.Office.Interop.Word to programatically remove all line numberings from a Word document. (How) is it possible?
我应该使用 LineNumbering接口?
推荐答案
行号是文档或节级别的设置,并且受PageSetup
对象的控制.要简单地在整个文档中将其关闭:
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;
这篇关于是否可以使用Microsoft.Office.Interop.Word以编程方式从Word文档中删除行号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文