I want to impress the boss.

Alex Martelli aleaxit at yahoo.com
Wed Oct 18 04:13:43 EDT 2000


"PG" <p.grattet at idsoft.net> wrote in message
news:39ED498F.7ADA244E at idsoft.net...
    [snip]
> I'm a vb programmer who looks at python.
> When I want word or (excel) doing something via com from my vb project, I
used
> to do the whole thing in word while recording a macro.
> Next, I open the macro and all my commands are here.I just need to copy
them to
> my project (sometimes with a little rewriting) and voila.

This is still doable if Python is the language you want to use, it's
just that the "little rewriting" becomes more...:-).

In fact, the macro-recording functionality of Word does work as a
"poor person's advisor" to the object model, but it often does things
rather weirdly -- it can get you started where you don't know where
to begin looking for some specific Word tweak, but the rewriting to
get to a GOOD automation-driver is substantial (and basically needs
good knowledge of the Word object model anyway... or, rather, that
meta-knowledge which means *knowing where to look for something and
how* that is often more important to such interfacing tasks [be they
for Office, or for any other rich & complex API...] than specific
detailed knowledge of the beast:-).

I'm reasonably often called to advise colleagues trying to integrate
something with Office, and the language-being-used issues (Basic vs
C++ vs Python vs our own proprietary scripting languages vs ...) are
generally quite minor, compared with the issue of understanding
which events you want to hook, on what objects, what method/properties
best serve your needs, etc...


Alex






More information about the Python-list mailing list