如何使用microsoft.interop.word从word文件中读取项目符号列表? [英] How to read bullet list from word file using microsoft.interop.word?

查看:93
本文介绍了如何使用microsoft.interop.word从word文件中读取项目符号列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个c#项目(.Net 4.0),我们使用microsoft的interop程序集从word文件中提取数据。我读过粗体,斜体,下划线等等。现在我想从word文件中读取项目符号列表。我怎样才能使用interop?

解决方案

你可以从段落范围内获得



 Document ODocument = Application.ActiveDocument 
Paragraph para = ODocument.Paragraphs [ 0 ];
ListFormat lstFormat = para.Range.ListFormat;






来自lstFormat的
你可以得到listString

从你可以获得的范围ListStyle



-------------------- -


I am working on a c# project (.Net 4.0) where we are extracting data from word file using microsoft's interop assembly. I have read bold, italic, underline etc. Now I want to read bullet list from word file. How can I do this using interop?

解决方案

you can get that from the paragraph range itself

Document ODocument = Application.ActiveDocument
Paragraph para= ODocument.Paragraphs[0];
ListFormat  lstFormat =  para.Range.ListFormat;




from lstFormat you can get listString
from range you can get ListStyle

---------------------


这篇关于如何使用microsoft.interop.word从word文件中读取项目符号列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆