[英]How to convert Word to images with win32com in python?
I have googled an example for converting Word to Html. 我已经在Google上搜索了将Word转换为HTML的示例。
import win32com
from win32com.client import Dispatch, constants
w = win32com.client.Dispatch('Word.Application')
w = win32com.client.DispatchEx('Word.Application')
'''skip some code here'''
wc = win32com.client.constants
w.ActiveDocument.SaveAs( FileName = filenameout, FileFormat = wc.wdFormatHTML )
I tried looking for something like wc.wdFormatPNG
as wc.wdFormatHTML
in the example but failed.And I wonder does the attribute exist?Or any other better solutions?Suggestions would be appreciated. 我尝试在示例中查找类似
wc.wdFormatPNG
wc.wdFormatHTML
,但是失败了。我不知道该属性是否存在?或者任何其他更好的解决方案?我们将不胜感激。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.