problem controlling MS Word from Python
killspam at darwinwars.com
Sat Oct 6 11:29:16 CEST 2001
"Travers Naran" <tnaran at direct.ca> wrote in
<9plt6r0e3b at enews1.newsguy.com>:
>Could you post some sample of your code? I have Office 97 on my machine
>(with HTML saving extensions). I'd be interested to see if it happens
>in the older Office as well.
I did post some earlier, and I'm reulctant to clutter the list, but here is
the relevant bit again: it is office 97 that I have been using. Some lines
have wrapped, but it should be ovious which, and where. I could post the
whole lot if you really want, but that seems rude -- and pointless unless
you have PyQT.
"Processes all the .doc files in a directory using do_that_thing
warning='OLE fuckup! ' + str(sys.exc_type) + str
# show what we're doing on the button
for wombats in os.listdir(os.getcwd()):
if string.find(wombats, 'doc')>1:
print 'have just processed', htmlfile
'''gets an instance of word, to save the docfile as html.'''
warn='DO that Thing! ' + str(sys.exc_type) + str
More information about the Python-list