I see people using this code however it doesn't seem to work for me! Any
help
Thanks James
Code:
from win32com.client import constants, Dispatch
outlook = Dispatch("Outlook.Application")
Error
com_error: (-2146959355, 'Server execution failed', None, None)
Traceback (innermost last):
File "
Another random comment re CoInitialize in servers...
Depending on your requirements, you may be better off with:
try:
pythoncom.CoInitializeEx(pythoncom.COINIT_MULTITHREADED)
except pythoncom.com_error:
# already initialized.
pass
(and as per Roger's comments, adding a flag to handle CoUni
Roger Upole wrote:
> Bob Gailer wrote:
>
>> Tim Golden wrote:
>>
>>> [Bob Gailer]
>>>
>>>
OK. I don't know whether its running in a thread. I made no
changes that I'm aware of that would cause the change in
behavior. I will add the call to pythoncom.CoInitialize.
Tim Golden wrote:
>>> [Bob Gailer]
>>>
>> Yeah, but when I said it was working, it was working in the server!
>> Wednesday AM just fine. Wednesday afternoon suddenly not working fine. I
>> swear I didn't change anything!
>>
>> Is there some way my program can introspect? to see if it is in
>> [Bob Gailer]
> Yeah, but when I said it was working, it was working in the server!
> Wednesday AM just fine. Wednesday afternoon suddenly not working fine. I
> swear I didn't change anything!
>
> Is there some way my program can introspect? to see if it is in a thread?
It's a bit clunky, but
Tim Golden wrote:
> [Bob Gailer]
>
>> OK. I don't know whether its running in a thread. I made no
>> changes that I'm aware of that would cause the change in
>> behavior. I will add the call to pythoncom.CoInitialize. I am
>> not familiar with this method.
>>
>
> This is one of those got
[Bob Gailer]
> OK. I don't know whether its running in a thread. I made no
> changes that I'm aware of that would cause the change in
> behavior. I will add the call to pythoncom.CoInitialize. I am
> not familiar with this method.
This is one of those gotcha's of Win32 COM programming;
you can
Roger Upole wrote:
> Bob Gailer wrote:
>
>> I'm running this under my Apache2triad mod_python installation.
>> Yesterday it was working. Today it is not.
>> In the Apache config mptest.py is defined as the request handler. When
>> called via an HTTP request I get the following:
>>
>> Traceback
I'm running this under my Apache2triad mod_python installation.
Yesterday it was working. Today it is not.
In the Apache config mptest.py is defined as the request handler. When
called via an HTTP request I get the following:
Traceback (most recent call last):
File "H:\Python24\Lib\site-packa