Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Dec 2004
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Attach a newly created file with CDONTS

    I'm still a bit new to asp, so if this is a simple question, forgive me.

    I have a form that a user fills in. When the user clicks the submit button, it sends the data via an email to me using CDONTS, while also creating a word document version of the data. The idea is that I get notification that a work request was submitted, and the user gets a nice copy of the request for them to cherish.

    However I was thinking, it might be nice to attach the newly created word file to the email that gets sent to me. Unfortunately, I don't know how to determine where this new word file gets saved to. It seems like it is being stored in the users cache, but how do I determine the path each time?

    Any help is appreciated.

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,074
    Thanks
    0
    Thanked 256 Times in 252 Posts
    How are you creating the Word document?
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________

  • #3
    New to the CF scene
    Join Date
    Dec 2004
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How I created the Word Document

    I have one page, web_request_form.asp, that submits the data to another page, web_request.asp. web_request.asp uses the simple-

    Response.ContentType = "application/msword"
    Response.AddHeader "Content-Disposition", "attachment;filename=web_request.doc"

    -to get the data into the word document. On that page I have some HTML formatted with a stylesheet to make the word document 'pretty'.

    I can get the word document created, and I can get the email sent, but I can't get the two of them to play nicely together.

  • #4
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,074
    Thanks
    0
    Thanked 256 Times in 252 Posts
    In order for the Word doc to be attached to the email, it has to be created and saved first in the server.

    Try reading this article about programmatically creating Word documents.

    http://www.winnetmag.com/WindowsScri...972/26972.html
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________


  •  

    Posting Permissions

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