PythonCOM / Word97 error/feature

Nikolai Kirsebom nikolai.kirsebom at siemens.no
Wed Mar 8 16:06:12 CET 2000


Have a strange observation - could anyone explain what is going on
(where).

Start PythonWin and using COM start Word97.  Write some text in Word
and executes the command:

doc.Content()

in the interactive window in PythonWin.  Content is presented ok.
Then, open the Spelling and Grammar (F7) dialog box in Word.  While
this dialog box is shown, reenter the same command in PythonWin.

Get the following com-error:
com_error: (-2146823683, 'OLE error 0x800a11fd', (0, 'Microsoft Word',
'This method or property is not available because the proofing dialog
box is active.', 'wdmain8.hlp', 37373, -2146823683), None)

which is ok.  However if I now close the dialog (spelling) and
reexecute the command, the helpfile for VBA (wdmian8.hlp) is opened -
actually any command to the server results in the VBA helpfile being
presented.  Also - it seems that the interactive window 'hangs' on the
opening (and ultimately closing) of the help window.

This behaviour seems to be particular for the 'spelling dialog'.
Doing the same operation with 'insert file' dialog will result in
another com-error, but the system will operate as expected after
closing down the 'insert file' dialog.

ANY IDEAS / COMMENTS.

Nikolai




More information about the Python-list mailing list