473,397 Members | 2,084 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,397 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 3673
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.