How to convert Word to images with win32com in python?

Posted by SpawnCxy on Stack Overflow See other posts from Stack Overflow or by SpawnCxy
Published on 2010-04-19T07:48:29Z Indexed on 2010/04/19 7:53 UTC
Read the original article Hit count: 423

Filed under:
|
|
|
|

Hi all,

I have googled an example for converting Word to 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.

© Stack Overflow or respective owner

Related posts about python

Related posts about Windows