get MSWord paragraph number via COM
I process MSWord document with Python
for paragraph in MSWord.Documents[0].ListParagraphs:
print(paragraph.ID+' '+paragraph.Range.Text.replace('\u206d','?')+'\n\n')
I Don't find how get MSWord paragraph number in API documentation cf. http://msdn.microsoft.com/en-us/library/microsoft.office.interop.word.paragraph_members
Any idea ?
Here you can find a VBA macro that finds the paragraph number, you could call it via COM
You could try:
print paragraph.Range.ListFormat.ListString
精彩评论