Creating Word doc from ASP

Discussion in 'ASP General' started by CJM, Sep 23, 2004.

  1. CJM

    CJM Guest

    Yes I can use Google too... but I haven't found the right article tutorial
    yet (though still looking).

    I want to create a Word document in ASP, which will be subsequently emailed
    to a client, so it needs to look good, and the examples I have found so far
    have been too simplistic.

    I'm actually looking to be able to create a quotes for customers, so I
    imagine someone out there has done something similar. And as you can
    imagine, it has to be a fairly professional job.

    I'm guessing that the best way to go about this is to use a template
    document and to just edit the fields?

    Anybody got any examples, pointers, suggestions, code for me to work from?

    Thanks

    Chris
     
    CJM, Sep 23, 2004
    #1
    1. Advertising

  2. Does it HAVE to be MS Word? If it is a standard form with field data stamped
    into it, I would use the PDF format and a product from Appligent called.
    FDFMerge.

    www.appligent.com

    Good luck.

    S

    "CJM" <> wrote in message
    news:#...
    > Yes I can use Google too... but I haven't found the right article tutorial
    > yet (though still looking).
    >
    > I want to create a Word document in ASP, which will be subsequently

    emailed
    > to a client, so it needs to look good, and the examples I have found so

    far
    > have been too simplistic.
    >
    > I'm actually looking to be able to create a quotes for customers, so I
    > imagine someone out there has done something similar. And as you can
    > imagine, it has to be a fairly professional job.
    >
    > I'm guessing that the best way to go about this is to use a template
    > document and to just edit the fields?
    >
    > Anybody got any examples, pointers, suggestions, code for me to work from?
    >
    > Thanks
    >
    > Chris
    >
    >
     
    Stephanie Stowe, Sep 23, 2004
    #2
    1. Advertising

  3. CJM

    Scott McNair Guest

    "CJM" <> wrote in
    news:#:

    > I want to create a Word document in ASP, which will be subsequently
    > emailed to a client, so it needs to look good, and the examples I have
    > found so far have been too simplistic.


    At the top of your ASP page:

    Response.ContentType = "application/msword"

    Then build the page just like you would any ASP file. When you run it,
    it will return the contents as a Word doc. If you would like to do the
    same for Excel:

    Response.ContentType = "application/vnd.ms-excel"

    Hope that helps,
    Scott
     
    Scott McNair, Sep 23, 2004
    #3
  4. CJM

    na Guest

    If you have Adobe Pro on your server, would that work the same way to create
    a PDF?... just a thought.

    "Scott McNair" <> wrote in message
    news:Xns956D93D6B46CFsfmco@207.46.248.16...
    > "CJM" <> wrote in
    > news:#:
    >
    >> I want to create a Word document in ASP, which will be subsequently
    >> emailed to a client, so it needs to look good, and the examples I have
    >> found so far have been too simplistic.

    >
    > At the top of your ASP page:
    >
    > Response.ContentType = "application/msword"
    >
    > Then build the page just like you would any ASP file. When you run it,
    > it will return the contents as a Word doc. If you would like to do the
    > same for Excel:
    >
    > Response.ContentType = "application/vnd.ms-excel"
    >
    > Hope that helps,
    > Scott
     
    na, Sep 25, 2004
    #4
  5. CJM

    CJM Guest

    Scott,

    This never occured to me. And I'm guessing I can get a pretty accurate
    layout using CM & PT for units...

    I'll have a go today, and postback later...

    Thanks

    Chris

    "Scott McNair" <> wrote in message
    news:Xns956D93D6B46CFsfmco@207.46.248.16...
    > "CJM" <> wrote in
    > news:#:
    >
    > > I want to create a Word document in ASP, which will be subsequently
    > > emailed to a client, so it needs to look good, and the examples I have
    > > found so far have been too simplistic.

    >
    > At the top of your ASP page:
    >
    > Response.ContentType = "application/msword"
    >
    > Then build the page just like you would any ASP file. When you run it,
    > it will return the contents as a Word doc. If you would like to do the
    > same for Excel:
    >
    > Response.ContentType = "application/vnd.ms-excel"
    >
    > Hope that helps,
    > Scott
     
    CJM, Sep 27, 2004
    #5
  6. CJM

    CJM Guest

    Scott,

    After some tinkering I realise I still have a bit of a problem.

    This solution streams the word doc to the user... I dont want this to
    happen - I need the file to be saved to the server.

    Is this possible using this technique?

    Cheers

    Chris
     
    CJM, Sep 27, 2004
    #6
  7. CJM

    CJM Guest

    Scratch that...

    I've found a suitable solution here:
    http://www.codeave.com/asp/code.asp?u_log=142

    Chris

    "CJM" <> wrote in message
    news:...
    > Scott,
    >
    > After some tinkering I realise I still have a bit of a problem.
    >
    > This solution streams the word doc to the user... I dont want this to
    > happen - I need the file to be saved to the server.
    >
    > Is this possible using this technique?
    >
    > Cheers
    >
    > Chris
    >
    >
     
    CJM, Sep 27, 2004
    #7
  8. CJM

    Scott McNair Guest

    "na" <> wrote in news:xaa5d.154314$XP3.124904@edtnps84:

    > If you have Adobe Pro on your server, would that work the same way to
    > create a PDF?... just a thought.


    Unfortunately, no. PDF is proprietary, and therefore isn't quite so easy
    to mimic.
     
    Scott McNair, Oct 5, 2004
    #8
    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. John Wallace
    Replies:
    0
    Views:
    478
    John Wallace
    Jul 22, 2003
  2. Stephen Witter

    opening a word doc in word not browser

    Stephen Witter, May 18, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    501
    Stephen Witter
    May 18, 2004
  3. Sharon
    Replies:
    0
    Views:
    613
    Sharon
    Jul 27, 2005
  4. Matt
    Replies:
    3
    Views:
    521
    Tor Iver Wilhelmsen
    Sep 17, 2004
  5. QQ

    Creating Word Doc from ASP

    QQ, Jan 6, 2004, in forum: ASP General
    Replies:
    2
    Views:
    122
    Michael D. Kersey
    Jan 7, 2004
Loading...

Share This Page