Python and Word
Anthony Evershed
anthony.evershed at npl.co.uk
Wed Jan 15 04:47:34 EST 2003
I'm trying to get Python 2.2.2 with Win32all extensions to use Word
2000's alignment tool when pushing data in. I have found the win32com
command:
wd.Selection.Paragraphs.Alignment(?)
(where wd = win32com.client.Dispatch('word.application')
But am stuck as to the argument to use for left align and centering.
PythonWin suggested an integer, but tests in interactive mode produced
only errors as below:
>>> wd.Selection.Paragraphs.Alignment(1)
Traceback (most recent call last):
File "<interactive input>", line 1, in ?
TypeError: 'int' object is not callable
Can anyone help?
Anthony Evershed
More information about the Python-list
mailing list