The constants are only available if you've run makepy on the Word object library.
Roger "kbperry" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On my machine, this runs fine, but when I try to run it on someone > elses machine it blows up with an attribute error: > > <code> > import win32com.client, pythoncom > > pythoncom.CoInitializeEx(pythoncom.COINIT_APARTMENTTHREADED) > myWord = win32com.client.dynamic.Dispatch ("Word.Application") > myWord.Visible = True > myDoc = myWord.Documents.Open(FileName= "C:\Test.doc") > myDoc .SaveAs(FileName = "c:\Test.htm", FileFormat = > win32com.client.constants.wdFormatHTML) > > myDoc.Saved=1 > myWord.Quit () > > del myWord > pythoncom.CoUninitialize() > </code> > > It's pretty simple code so I don't understand why it doesn't work. I > verified that he has the same pywin32 module as me (build 207) and the > same python version (2.4.2). > > Any ideas? > ----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==---- http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups ---= East/West-Coast Server Farms - Total Privacy via Encryption =--- -- http://mail.python.org/mailman/listinfo/python-list