[python-win32] odd problem with Microsoft Word
Ross McKerchar
it at crummock.com
Sun Mar 18 12:20:45 CET 2007
Kelie wrote:
> The simple code shown below runs fine. It adds a custom document property to the
> active word document. But as soon as i use makepy on the "Microsoft Office 11.0
> Object Library (2.3)", i get an AttributeError when run the same code:
> AttributeError: '<win32com.gen_py.Microsoft Office 11.0 Object
> Library.DocumentProperties instance at 0x28416160>' object has no attribute 'Add'
>
When you use early bound code everything becomes case sensitive when it
wasn't before. Admmitedly, however 'Add' with an uppercase A does seem
right for office.
Another less well documented difference I've found when using early
binding is that keyword arguments work when they didn't before. I doubt
it's relevant but worth bearing in mind.
HTH.
-ross
More information about the Python-win32
mailing list