|
List Info
Thread: MAPI, windows service and getting handle to executing outlook process
|
|
| MAPI, windows service and getting handle
to executing outlook process |

|
2006-01-30 21:59:19 |
|
I am writing a mail extractor program to download mail from outlook via MAPI. The script works fine as a console program and as an NT service if outlook is not running. If outlook process is running then the service times out with the following exception:
File "win32comclient__init__.pyc", line 95, in Dispatch File "win32comclientdynamic.pyc", line 91, in _GetGoodDispatchAndUserName File "win32comclientdynamic.pyc", line 79, in _GetGoodDispatch
com_error: (-2146959355, 'Server execution failed', None, None)
at the line: outlook = win32com.client.Dispatch("Outlook.Application")
I see that there is a new OUTLOOK.EXE process created as well. Looks like I need to get a handle to the executing process and not spawn a new one.
Anybody has faced this before and provide some pointers?
Thanks for your help.
|
| MAPI, windows service and getting handle
to executing outlook process |

|
2006-01-30 22:12:21 |
|
| Try:
outlook=win32com.client.GetActiveObject("Outlook.Application")
Mark.
I am writing a mail extractor program to download
mail from outlook via MAPI. The script works fine as a console program and as
an NT service if outlook is not running. If outlook process is running then
the service times out with the following exception:
File
"win32comclient__init__.pyc", line 95, in Dispatch File
"win32comclientdynamic.pyc", line 91, in
_GetGoodDispatchAndUserName File "win32comclientdynamic.pyc", line
79, in _GetGoodDispatch com_error: (-2146959355, 'Server execution
failed', None, None)
at the line: outlook =
win32com.client.Dispatch("Outlook.Application")
I see that there is a
new OUTLOOK.EXE process created as well. Looks like I need to get a handle to
the executing process and not spawn a new one.
Anybody has faced this
before and provide some pointers?
Thanks for your
help.
|
[1-2]
|
|
|
about | contact Other archives ( Real Estate discussion Medical topics )
|