[python-win32] How to find a Type Library for makepy?

Tim Roberts timr at probo.com
Fri Aug 1 18:39:17 CEST 2008


brendon wolff-piggott wrote:
>
> I'm trying to automate using an Office component for character 
> recognition using python.  I can see the type library from the VB 
> Express IDE I downloaded to get it working.  When I run makepy on it 
> using:
>
> import win32com.client.makepy
> win32com.client.makepy.ShowInfo("Microsoft Office Document Imaging 
> Viewer Control 12.0")
>
> I get:
> Could not locate a type library matching 'Microsoft Office Document 
> Imaging Viewer Control 12.0'
>
> I know the DLL name, and have checked that it is registered.   But the 
> library name passed to makepy does not appear in the registry.  Do I 
> need to edit the registry to fix this?  Where should I look for 
> documentation on this?

That's the friendly name of the control itself, not the name of the type 
library.  In version 11, the type library name was "Microsoft Office 
Document Imaging 11.0 Type Library".

The class name of the control is LMDocViewer.LMDocView, or at least it 
was in version 11, so you should be able to do
    vwr = win32com.client.Dispatch( 'LMDocViewer.LMDocView' )

-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the python-win32 mailing list