exporting a record from a database to a MS Word document.
ici
iltchevi at gmail.com
Sun May 6 17:36:15 EDT 2007
Levi Campbell wrote:
> Is there a way to export a record from a database kept with bsddb to
> MS Word, possibly with some type of formatting data?
import win32com.client
try: import psyco; psyco.full()
except ImportError: pass
app = win32com.client.Dispatch("Word.Application")
app.Visible = True
doc = app.Documents.Add()
para = doc.Paragraphs.Add()
para.Range.Text = "DB Record"
para.Range.Bold = True
#...
doc.Close(True)
app.Quit()
More information about the Python-list
mailing list