SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict
    Join Date
    May 2001
    Posts
    217
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    mailmerge, microsoft word document, linux OS

    Hi,

    I am trying to generate a mailmerge file using my mySQL database information. However, mailmerge requires a word document. I know how to create a word document using Windows Server, but does anyone know how to make it using a linux server?

    Thanks,
    unregistered1.

  2. #2
    SitePoint Addict
    Join Date
    Apr 2002
    Posts
    330
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by unregistered1
    I am trying to generate a mailmerge file using my mySQL database information. However, mailmerge requires a word document. I know how to create a word document using Windows Server, but does anyone know how to make it using a linux server?
    The best way to create Word documents is through COM objects. However, COM objects only run on Windows (or may be WINE).

    An alternative way is to generate RTF documents and serve them with .doc filename extension and MS Word content type. Word will load RTF documents correctly as RTF is a text format meant for interchange of documents between word processors eventually running on different platforms.

    Here you may find an interesting class for composing and generating RTF documents. It takes as input HTML markup subset to define the document contents, making it easier to generate RTF documents.

    To implement a mail merge feature you can use your favorite template engine and feed the processed HTML to the RTF generator class.
    Manuel Lemos

    Metastorage - Data object relational mapping layer generator
    PHP Classes - Free ready to use OOP components in PHP


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •