stuck on COM interface to Word
AKiss at GEOMETRIA.hu
Tue Aug 3 10:31:39 CEST 1999
Here is an example:
print time.ctime(int(doc.BuiltInDocumentProperties("Last Print Date")))
The online help contains other useful keywords(find the details of the
DocumentProperty): "Title","Subject","Author" etc.
Jim Kerr <jbkerr at sr.hp.com> wrote in message
news:<37A60515.370B5085 at sr.hp.com>...
> I'm trying to write a python script to extract some properties from a set
> of Word documents. The attributes I'm interested in are things like author's
> name, last print date, keywords, etc.
> This is what I have so far:
> from win32com.client import constants,Dispatch
> import string,os
> app = Dispatch('Word.Application.8')
> app.Documents.Open(r"C:\My Documents\myMemo.doc")
> doc = app.ActiveDocument
> print "Last printed date: ", # ?? what goes here ??
> I tried using combrowse.py to figure out what the properties of the
> but I couldn't find anything that looked relevant.
> Is there any web-based info on COM interfaces to various programs? Or
> have to buy Visual Basic books and translate for yourself?
> Thanks for the help!
> Jim Kerr
> Santa Rosa Systems Division
> 1400 Fountaingrove Pkwy, MS 3USZ
> Santa Rosa, CA 95403
More information about the Python-list