473,326 Members | 2,102 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Registering a COM object in Python

I need to communicate with Outlook 2000 COM object using win32com in Python.

I registered a new class and called

win32com.server.register.UseCommandLine(OutlookAdd in)

using this for OutlookAddin

class OutlookAddin:
_com_interfaces_ = ['_IDTExtensibility2']
_public_methods_ = ['alive']
_reg_clsctx_ = pythoncom.CLSCTX_INPROC_SERVER
_reg_clsid_ = "{16925498-0E7D-4d7f-A26B-825D994FBCBC}"
_reg_progid_ = "Test.OutlookAddin"

Also ive defined OnConnection and other events but they NEVER get called

Somebody knows what is happening ?

Thanks,
Fernando
Jul 18 '05 #1
3 3667
Hi Fernando,

do you want to call your python class from outlook, or outlook from your
python class?

Greets
Florian

"Fernando Gabrieli" <fg*******@extrabold.com> schrieb im Newsbeitrag
news:3b**************************@posting.google.c om...
I need to communicate with Outlook 2000 COM object using win32com in Python.
I registered a new class and called

win32com.server.register.UseCommandLine(OutlookAdd in)

using this for OutlookAddin

class OutlookAddin:
_com_interfaces_ = ['_IDTExtensibility2']
_public_methods_ = ['alive']
_reg_clsctx_ = pythoncom.CLSCTX_INPROC_SERVER
_reg_clsid_ = "{16925498-0E7D-4d7f-A26B-825D994FBCBC}"
_reg_progid_ = "Test.OutlookAddin"

Also ive defined OnConnection and other events but they NEVER get called

Somebody knows what is happening ?

Thanks,
Fernando

Jul 18 '05 #2
I need to call Outlook COM methods from Python

Thanks for answering :)

Bye,
Fernando

"Florian Reiser" <fl************@ra-bc.de> wrote in message news:<bn**********@online.de>...
Hi Fernando,

do you want to call your python class from outlook, or outlook from your
python class?

Greets
Florian

"Fernando Gabrieli" <fg*******@extrabold.com> schrieb im Newsbeitrag
news:3b**************************@posting.google.c om...
I need to communicate with Outlook 2000 COM object using win32com in

Python.

I registered a new class and called

win32com.server.register.UseCommandLine(OutlookAdd in)

using this for OutlookAddin

class OutlookAddin:
_com_interfaces_ = ['_IDTExtensibility2']
_public_methods_ = ['alive']
_reg_clsctx_ = pythoncom.CLSCTX_INPROC_SERVER
_reg_clsid_ = "{16925498-0E7D-4d7f-A26B-825D994FBCBC}"
_reg_progid_ = "Test.OutlookAddin"

Also ive defined OnConnection and other events but they NEVER get called

Somebody knows what is happening ?

Thanks,
Fernando

Jul 18 '05 #3
Hi Fernando,

generate the definition file for Outlook with the gen_py utility.
After that, try the following code:

import win32com.client
outlookObject = win32com.client.Dispatch("Outlook.View")

then do anything you want on outlookObject. After that release outlookObject
with del outlookObject.

Greets
Florian

"Fernando Gabrieli" <fg*******@extrabold.com> schrieb im Newsbeitrag
news:3b*************************@posting.google.co m...
I need to call Outlook COM methods from Python

Thanks for answering :)

Bye,
Fernando

"Florian Reiser" <fl************@ra-bc.de> wrote in message

news:<bn**********@online.de>...
Hi Fernando,

do you want to call your python class from outlook, or outlook from your
python class?

Greets
Florian

"Fernando Gabrieli" <fg*******@extrabold.com> schrieb im Newsbeitrag
news:3b**************************@posting.google.c om...
I need to communicate with Outlook 2000 COM object using win32com in

Python.

I registered a new class and called

win32com.server.register.UseCommandLine(OutlookAdd in)

using this for OutlookAddin

class OutlookAddin:
_com_interfaces_ = ['_IDTExtensibility2']
_public_methods_ = ['alive']
_reg_clsctx_ = pythoncom.CLSCTX_INPROC_SERVER
_reg_clsid_ = "{16925498-0E7D-4d7f-A26B-825D994FBCBC}"
_reg_progid_ = "Test.OutlookAddin"

Also ive defined OnConnection and other events but they NEVER get called
Somebody knows what is happening ?

Thanks,
Fernando

Jul 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Sylwia | last post by:
Hi! I have the following problem :( After registering the "PythonService.exe" executable... C:\Python23\Lib\site-packages\win32>PythonService.exe -register I got the following error...
6
by: Daniel Bass | last post by:
The scenario: ------------- I've created a simple COM object according to a tutorial I found: http://www.csharphelp.com/archives/archive281.html It automatically creates a Type Library...
6
by: ian | last post by:
Hi All I have a DLL (nahd.dll) that has been supplied to me will a PBX phone system. According to the documentation it is to allow developers to write there own applications to monitor the...
2
by: tooper | last post by:
Hello, I'm failing to register a python based COM component without having admin rights... Using the usual hello world COM server that exist in many books/tutorial, and works perfecty when...
13
by: noone | last post by:
consider the following problem: You have a C style library and API that uses callbacks to implement functionality. Examples of this are X11 API, OpenGL/GLUT...The List goes on. The power of...
7
by: Chris Jewell | last post by:
Hi, I'm wondering what the best way of registering a data storage class with a data handler class is. At the moment I have two classes: class EpiCovars // Storage class { ....
1
by: pRony | last post by:
A warm welcome from me to everyone i am facing problems for registering python for using iis i tried out by running pyscript.py but was of no use an error is returned in the web page http/500...
5
by: fernando | last post by:
Could someone post an example on how to register a python function as a callback in a C function? It expects a pointer to PyObject... how do I expose that? Basically, the signature of the function...
0
by: Tim Spens | last post by:
--- On Fri, 6/27/08, Tim Spens <t_spens@yahoo.comwrote: I think I know where the problem is but I'm unsure how to fix it. When I call Register_Handler(...) from python via...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.