Accessing VBA.Strings

Alex Martelli aleaxit at yahoo.com
Tue May 22 04:25:26 EDT 2001


"Tomaz Ficko" <tomaz.ficko at agroruse.si> wrote in message
news:48oO6.439$IB1.21884 at news.siol.net...
> I want to use function chrW() from VBA.Strings class so I tried to use
> Dispatch, but this is all I get:
>
> >>> from win32com.client import Dispatch
> >>> q=Dispatch('VBA.Strings')
    ...
> com_error: (-2147221005, 'Invalid class string', None, None)
>
> What am I doing wrong?

Is 'VBA.Strings' registered as a COM coclass name (ProgID) in
your registry?  Look under HKEY_CLASSES_ROOT with e.g. regedit.
It's not registered in mine, and I don't know if it can be or
how one would go about it.

Anyway, what would chrW do for you that you can't do with
Python's own builtin unichr()...?


Alex






More information about the Python-list mailing list