See https://stackoverflow.com/questions/45243545/when-getting-document-object-from-word-application-object-its-members-are-not-f

In brief, when getting properties of a "static" object, in some cases, a "dynamic" object is returned even though there is info on its members:
|
In [112]: w =win32com.client.GetActiveObject('Word.Application')

In [113]: w
Out[113]: <win32com.gen_py.Microsoft Word 12.0 Object Library._Application instance at 0x47365736>

In [114]: w.ActiveDocument
Out[114]: <win32com.gen_py.None.Document>

In [115]: d=_

In [116]: d._dispobj_
Out[116]: <win32com.gen_py.Microsoft Word 12.0 Object Library._Document instance at 0x47366352>


Since this is very inconvenient and there's no earthy need to do so that I can see, maybe a fix is in order?
|

--
Regards,
Ivan

_______________________________________________
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32

Reply via email to