Re: Mail Merge from python data

Discussion in 'Python' started by Dennis Lee Bieber, Nov 3, 2010.

  1. On Tue, 2 Nov 2010 20:32:13 +1000, Dylan Evans <>
    declaimed the following in gmane.comp.python.general:

    > I'm setting up a database for an organisation who want to do mail merges in
    > office 2010. I know i can use the MySQL ODBC driver for the mail merge but i
    > have set up the database with lots of relations and many-to-many links which
    > i'm sure will lead to a huge amount of confusion (I think, i don't really
    > know much about mail merge).
    >
    > What i want to know is, is there anyway to send data from python, which the
    > UI is written in, to office templates and mail merges?


    Ad hoc mail merge, or a long lived form?

    If a long lived form, I'd probably define a query or view (I think
    MySQL 5.x has output-only views) that isolates just to the data fields
    used in the mail merge.


    {"many-to-many" links? I presume you mean an intersection table so you
    have one-to-many<>many-to-one type end-points}
    --
    Wulfraed Dennis Lee Bieber AF6VN
    HTTP://wlfraed.home.netcom.com/
    Dennis Lee Bieber, Nov 3, 2010
    #1
    1. Advertising

  2. Dennis Lee Bieber

    Tim Harig Guest

    This page didn't make it to through to my nntp server so I appologize if I
    miss something that was covered.

    On 2010-11-03, Dennis Lee Bieber <> wrote:
    > On Tue, 2 Nov 2010 20:32:13 +1000, Dylan Evans <>
    > declaimed the following in gmane.comp.python.general:
    >
    >> I'm setting up a database for an organisation who want to do mail merges in
    >> office 2010. I know i can use the MySQL ODBC driver for the mail merge but i
    >> have set up the database with lots of relations and many-to-many links which
    >> i'm sure will lead to a huge amount of confusion (I think, i don't really
    >> know much about mail merge).


    Many to many relationships without some kind of intersection table are
    considered a rather poor practice in general.

    >> What i want to know is, is there anyway to send data from python, which the
    >> UI is written in, to office templates and mail merges?

    >
    > If a long lived form, I'd probably define a query or view (I think
    > MySQL 5.x has output-only views) that isolates just to the data fields
    > used in the mail merge.


    I agree that a view would be the best solution if you have the access to do
    so; but, a couple of other alternatives come to mind in case you do not.

    1. Do the mail merge in Python using a Word template. Then you can add any
    kind of logic that you need to the merge.

    2. Add some kind of export function to your python UI that allows you to
    export the data to an Excel sheet, CSV, or even another ODBC data
    source (like another MySQL table or database that you might have
    access to).
    Tim Harig, Nov 3, 2010
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. VB Programmer

    How to emulate Word mail merge in HTML?

    VB Programmer, May 20, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    1,130
    VB Programmer
    May 20, 2004
  2. Martin Feuersteiner
    Replies:
    0
    Views:
    2,988
    Martin Feuersteiner
    Jul 19, 2004
  3. Replies:
    0
    Views:
    356
  4. Danny Ni

    Mail merge in ASP.Net

    Danny Ni, May 16, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    660
    =?Utf-8?B?VG9ueQ==?=
    May 16, 2005
  5. Patrick
    Replies:
    0
    Views:
    325
    Patrick
    Feb 17, 2004
Loading...

Share This Page