我正在尝试使用 Python 来超链接 MS Word 文档中的文本。我目前正在使用 win32com 模块,但我对如何从脚注中获取文本(以及如何添加超链接)有点困惑。
我尝试阅读以下内容: https://msdn.microsoft.com/en-us/library/kw65a0we(VS.80).aspx https://msdn.microsoft.com/en-us/library/bb179107(v=office.12).aspx 努力看看命令可能是什么。
最佳答案
使用
footnotes = ActiveDocument.StoryRanges(wdFootnotesStory)
footnotes.Find.Execute(FindText="Microsoft Word", Forward=True)
while footnotes.Find.Found:
...do something, then:
footnotes.Find.Execute(FindText="Microsoft Word", Forward=True)
更多详情请访问https://msdn.microsoft.com/en-us/library/office/ff845743.aspx .
关于python - 使用Python在word中查找和替换脚注,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34834338/