hi,
thank you for the hint, but i solved the problem myself.
i didnt knew that that the following two lines in py-script must be added:
from win32com.client import gencache
gencache.Ensure Module('{00062F FF-0000-0000-C000-000000000046}', 0,8,0)
now it works fine. my skills in python in python are not really advanced, so
the python-mailinglists are good help for me.
so long
ben
[color=blue]
>hi,
>
>i'm using pythonwin 2.2.3
>my programm reads and write the outlook-adress book using COM. for this i
>have to use the makepy utility. after i have run the utiltity everything is
>fine and i can run my py-file without any errors.
>but if i close the pythonwin and restart and then try to run my py-script i
>get the following error:
>
>File "C:\Program Files\Python22\ contacts_ausgab e.py", line 45, in
>DumpDefaultAdd ressBook
> folder =
>mapi.GetDefaul tFolder(win32co m.client.consta nts.olFolderCon tacts)
> File[/color]
"C:\PROGRA~1\Py thon22\lib\site-packages\win32c om\client\__ini t__.py",[color=blue]
>line 168, in __getattr__
> raise AttributeError, a
>AttributeError : olFolderContact s[/color]
I suggest you examine the attributes of win32com.client .constants. Perhaps
there is a case sensitivity issue. makepy can cause attributes that were
previously case insensitive to become case sensitive.
I also recall somewhere a discussion about win32com.client .constants not
being populated immediately. Consider waiting a moment after dispaching.
Bob Gailer
[email protected] i.edu
303 442 2625
thank you for the hint, but i solved the problem myself.
i didnt knew that that the following two lines in py-script must be added:
from win32com.client import gencache
gencache.Ensure Module('{00062F FF-0000-0000-C000-000000000046}', 0,8,0)
now it works fine. my skills in python in python are not really advanced, so
the python-mailinglists are good help for me.
so long
ben
[color=blue]
>hi,
>
>i'm using pythonwin 2.2.3
>my programm reads and write the outlook-adress book using COM. for this i
>have to use the makepy utility. after i have run the utiltity everything is
>fine and i can run my py-file without any errors.
>but if i close the pythonwin and restart and then try to run my py-script i
>get the following error:
>
>File "C:\Program Files\Python22\ contacts_ausgab e.py", line 45, in
>DumpDefaultAdd ressBook
> folder =
>mapi.GetDefaul tFolder(win32co m.client.consta nts.olFolderCon tacts)
> File[/color]
"C:\PROGRA~1\Py thon22\lib\site-packages\win32c om\client\__ini t__.py",[color=blue]
>line 168, in __getattr__
> raise AttributeError, a
>AttributeError : olFolderContact s[/color]
I suggest you examine the attributes of win32com.client .constants. Perhaps
there is a case sensitivity issue. makepy can cause attributes that were
previously case insensitive to become case sensitive.
I also recall somewhere a discussion about win32com.client .constants not
being populated immediately. Consider waiting a moment after dispaching.
Bob Gailer
[email protected] i.edu
303 442 2625