Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to find an COM object in using of pywin32

1 view
Skip to first unread message

Steven Woody

unread,
Mar 2, 2010, 12:48:33 AM3/2/10
to python-list
Hi,

I want to interactive with an OLE application with pywin32. The
problem is I get totally no idea how to find the object in OLEView and
how to figure out it's interface.

With pywin32's example, I even don't understand that in the below statement,

win32com.client.Dispatch('Excel.Application')

that where the name 'Excel.Application' comes from? In OLEView
(Microsoft's COM brower), I cannot find this name.


Could you give me any help? Thanks


--
Life is the only flaw in an otherwise perfect nonexistence
-- Schopenhauer

narke
public key at http://subkeys.pgp.net:11371 (narke...@gmail.com)

Alf P. Steinbach

unread,
Mar 2, 2010, 3:42:46 AM3/2/10
to
* Steven Woody:

> Hi,
>
> I want to interactive with an OLE application with pywin32. The
> problem is I get totally no idea how to find the object in OLEView and
> how to figure out it's interface.
>
> With pywin32's example, I even don't understand that in the below statement,
>
> win32com.client.Dispatch('Excel.Application')
>
> that where the name 'Excel.Application' comes from? In OLEView
> (Microsoft's COM brower), I cannot find this name.

It's a "programmatic identifier" a.k.a. "progid".

It identifies a COM class and it's used as a readable but more
name-collision-prone alternative to the 128-bit UUID.

You can find the programmatic identifiers in the Windows registry (use e.g.
regedit); often they're not documented.


Cheers,

- Alf

0 new messages