COM question

Richard Chamberlain richard_chamberlain at ntlworld.com
Mon May 1 03:03:55 EDT 2000


David,

What version of Office have you got?

In the COM Browser on my machine I get Microsoft Word 8.0 Object Library.

This is for Office 97 and I can start Word as:

x=win32com.client.Dispatch('Word.Application')

You may have a problem with your installation try reinstalling Word.

Richard

"David Lees" <debl.nospamm at world.std.com> wrote in message
news:390D16B7.B2524B at world.std.com...
> 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