开发者

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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜