如何从vsto中的word文档中获取段落编号

问题描述:

https://stackoverflow.com/questions/47653763/how-to-get-the-paragraph-number-from-word-document-in-vsto

https://stackoverflow.com/questions/47653763/how-to-get-the-paragraph-number-from-word-document-in-vsto

假设我们在文档中有一段如下:

Suppose we have a paragraph in a document as below:


  1.       
    橙色
  2.        
    Apple
  3.        
    芒果
  1.        Orange
  2.        Apple
  3.        Mango

我需要检索段落中每个实体的编号列表。对于Orange-1,Apple-2和Mango-3

I need to retrieve the Numbered List for each entities in the paragraph. For Orange- 1, Apple-2 and Mango-3

我已经使用以下代码查找文档中的段落列表。

I have already used the below code to find out the list of Paragraphs in the document.

Word。 段落
para = ActiveDocument.Paragraphs;

从para 对象我需要找出每个实体的列表编号。

关于VSTO的情况,我会将你的线程移到
用于Office的Visual Studio工具(VSTO)
论坛以获得合适的帮助。

For your case about VSTO, I will move your thread to Visual Studio Tools for Office (VSTO) Forum for suitable help.

您的理解与合作将不胜感激。

Your understanding and cooperation will be grateful.

此致,

Bob