COM question

David Lees debl.nospamm at world.std.com
Mon May 1 01:31:54 EDT 2000


You are correct, I forgot to mention I am using Pythonwin. Thanks for
pointing out the COM browswer.  Unfortunately, while it does tell what
is registered it does not tell me the name to use to access it.  For
example,  
x1 = win32com.client.Dispatch("PowerPoint.Application") works fine, but

x1 = win32com.client.Dispatch("Word.Application")

gives error message, thought I do see something registered as
word.document.6 when I look with the COM Browser.  Any more suggestions?

David Lees

Sam Schulenburg wrote:
> 
> I assume that you are using Pythonwin. If this is the case you can browse
> the registery for your COM objects. The particular example that you give
> "Word.Application" should work. Verify that when you browse the registery
> with the COM Browser provided in the tools menu, that you see Word.
> Sam Schulenburg
> 
> David Lees <debl.nospamm at world.std.com> wrote in message
> news:390CDC8B.779DB0C3 at world.std.com...
> > I am working examples in Hammond book on Python.  How do I get a list of
> > names of COM objects?  I am on page 67 and and to know how to figure out
> > what is the name for a Microsoft Word object.  In the example it is
> > referred to as:
> > "Word.Application", but this gives a name error.  I am doing the client
> > call correctly, because when I substitute "Excel.Application" or
> > "Access.Application"  I have not problem opening and closing Excel or
> > Access.  Apparently Word must have a different name for COM stuff on my
> > system, so I thought that if someone can tell me how to look at the list
> > of COM objects the name will be obvious.  I have Norton Utility under
> > Win95 OSR2, so I can easily look at the Registry (though as a Win95
> > newbie, much of it is not intelligible)
> >
> > Thanks in advance.
> >
> > David Lees
> >



More information about the Python-list mailing list