ASP/Word Merge

Discussion in 'ASP General' started by JV, Jun 20, 2005.

  1. JV

    JV Guest

    I've done some research on how to do a MS Word merge with data I read
    in an ASP application (using a SQL Server database).

    I understand the concept since I've done it in a couple other
    programming languages. However, I need to pointers/help how to do this
    in ASP.

    Thanks very much for your help!

    JV
    JV, Jun 20, 2005
    #1
    1. Advertising

  2. Hi JV,

    ASP is really not the right technology to use for automating mail merges in
    Word. For one, server-side automation of Office objects (i.e. Word) is
    strongly ill-advised. Also, ASP is meant for immediate request and response
    type of interaction between a user and a server, not long job processing.
    May I ask why you need to do this in ASP as opposed to just running a vbs
    script or something along those lines to do this?

    Ray at work

    "JV" <> wrote in message
    news:...
    > I've done some research on how to do a MS Word merge with data I read
    > in an ASP application (using a SQL Server database).
    >
    > I understand the concept since I've done it in a couple other
    > programming languages. However, I need to pointers/help how to do this
    > in ASP.
    >
    > Thanks very much for your help!
    >
    > JV
    >
    Ray Costanzo [MVP], Jun 20, 2005
    #2
    1. Advertising

  3. JV

    JV Guest

    Ray,

    A VBS script would be fine too (it's just an ASP environment ...). What
    do I need to do to set this up in VBS script? Where would I call this
    script? Perhaps you have an example .... ?

    JV
    JV, Jun 20, 2005
    #3
  4. I do not have an example or anything. Most of this would involve automation
    of Word and being familiar with the Word object model. I suggest inquiring
    in a Word programming group (VBA) and starting there. If you can get it
    working in VBA in Word, it should be translatable to VBS. For help with
    that, I'd then go to m.p.scripting.vbscript.

    Ray at work

    "JV" <> wrote in message
    news:...
    > Ray,
    >
    > A VBS script would be fine too (it's just an ASP environment ...). What
    > do I need to do to set this up in VBS script? Where would I call this
    > script? Perhaps you have an example .... ?
    >
    > JV
    >
    Ray Costanzo [MVP], Jun 21, 2005
    #4
  5. JV

    JV Guest

    Fair enough.

    I assume this option (VBs) requires MS Word to be installed on the
    server? I'd like to create a document (by means of the merge) and let
    the user download it to his/her client.

    JV
    JV, Jun 21, 2005
    #5
  6. JV

    JV Guest

    Perhaps I should ask a somewhat different question instead. Is it
    possible to have merge data (from SQL Server) via special placeholders
    in a Word document ? I noticed that most "Word merge VBs examples" all
    create new documents by inserting things like paragrahs in conjunction
    to actual data. I'd like to define my template first and then just
    replace its placeholders with actual data.
    JV, Jun 21, 2005
    #6
  7. Yes, it's all possible, but you need to start small and do it one step at a
    time.

    1. How do you connect to a SQL Server?
    2. How do you get data from it and put the data into a string variable?
    3. How do you open up a Word doc programatically?
    4. How do you insert string data from a string variable into a Word doc
    programatically?

    One step at a time. Ask appropriate questions in appropriate groups.

    Ray at work

    "JV" <> wrote in message
    news:...
    > Perhaps I should ask a somewhat different question instead. Is it
    > possible to have merge data (from SQL Server) via special placeholders
    > in a Word document ? I noticed that most "Word merge VBs examples" all
    > create new documents by inserting things like paragrahs in conjunction
    > to actual data. I'd like to define my template first and then just
    > replace its placeholders with actual data.
    >
    Ray Costanzo [MVP], Jun 21, 2005
    #7
    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,126
    VB Programmer
    May 20, 2004
  2. Martin Feuersteiner
    Replies:
    0
    Views:
    2,971
    Martin Feuersteiner
    Jul 19, 2004
  3. Steve M

    MS Word mail merge automation

    Steve M, Sep 30, 2005, in forum: Python
    Replies:
    2
    Views:
    1,296
    Steve M
    Oct 5, 2005
  4. Replies:
    0
    Views:
    415
  5. Morris

    Mail merge to Word from ASP

    Morris, Jan 19, 2005, in forum: ASP General
    Replies:
    1
    Views:
    244
    Bullschmidt
    Jan 26, 2005
Loading...

Share This Page