cool_go_blue wrote: > I did try the one you suggest. But I got: > > File "D:\projects\Myself\MySVD\src\ReadWord.py", line 11, in <module> > > app.ActiveDocument.SaveAs('D:\projects\Myself\HelloPython\src\Drugreservoir1.txt',FileFormat=win32com.client.constants.wdFormatText) > File > "D:\Softwares\Python27\lib\site-packages\win32com\client\__init__.py", > line 170, in __getattr__ > raise AttributeError(a) > AttributeError: wdFormatText > > Also I replace wdFormatText with wdFormatTextLineBreaks. Same error... >
How are you creating your Word object? The Dispatch process should import these constants for you. In any case, 15 seconds with Google would have showed you that wdFormatText = 2 and wdFormatTextLineBreaks = 3. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. _______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32