pywin32 - word object reference module - automating form filling
Tim Golden
mail at timgolden.me.uk
Tue Jun 9 11:24:52 EDT 2009
Brendan wrote:
> Hmmm. The VB examples in the Word Object Reference give the best idea
> of how to play with Word documents. No further help required on this
> although I am still curious about why the python does not return the
> "real" objects and methods for the COM object.
Try doing it this way:
<code>
import win32com.client
word = win32com.client.gencache.EnsureDispatch ("Word.Application")
help (word)
doc = win32com.client.gencache.EnsureDispatch (word.Documents.Add ())
help (doc)
</code>
or just run the makepy util first.
TJG
More information about the Python-list
mailing list