exporting a record from a database to a MS Word document.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Levi Campbell

    exporting a record from a database to a MS Word document.

    Is there a way to export a record from a database kept with bsddb to
    MS Word, possibly with some type of formatting data?

  • ici

    #2
    Re: exporting a record from a database to a MS Word document.


    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.A dd()
    para = doc.Paragraphs. Add()
    para.Range.Text = "DB Record"
    para.Range.Bold = True
    #...
    doc.Close(True)
    app.Quit()

    Comment

    • ici

      #3
      Re: exporting a record from a database to a MS Word document.


      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.A dd()
      para = doc.Paragraphs. Add()
      para.Range.Text = "DB Record"
      para.Range.Bold = True
      #...
      doc.Close(True)
      app.Quit()

      Comment

      Working...