Question:

Need web form data to be submitted via email attachment as a word file?

by  |  earlier

0 LIKES UnLike

Creating a web site for a friend which consists of a fairly simple web form and upon selecting submit, he wishes to have the form data submitted as a structure .doc file. Does anyone have any experience with this ? I have no clue how to accomplish this, i wish to program this site using asp if possible !!

 Tags:

   Report

1 ANSWERS


  1. That's tricky. A .doc file might not be the best way to go; I would recommend a .rtf file or a .txt file.

    I don't know how to generate an RTF file on the fly, but a TXT file can be generated by using the TextStream object of the FileSystemObject object.

    This page tells how to generate an RTF file, but I haven't tried it: http://www.tutorialized.com/view/tutoria...

    I'm assuming you mean that you want the form to generate a file that is then attached to an email and sent to your friend.

    You'll need to find out what email object your server has. It might be something like this: http://www.aspemail.com/manual_02.html

    So, you would start out with your web form, and then upon submit take the data from the form and put it into a TXT or RTF file, then save the file in a folder on your server, then create an email object and attach the file to that email, then send the email. You can then delete the file that you just saved, or leave it.

    Be sure to have your host set write permissions on the folder where you plan to write your TXT or RTF file, otherwise it won't work.

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.