can a .doc or .docx file be send through an email in the attachment?

hello:

i have a .doc file (file attached ). is that possible when user finish filling out the information, the user can just click the sumbit and sent the file as an email attachemnt to me?

Thank you so much for your suggestion!!



testForm.doc
lilyyanAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ASPSQLServerCOMCommented:
hi,

there are couple of different way
you can use the normal web form to get the user data and when user submit at that time on server create word document object and create document or you can create word document template and then use that template to create the final document and then use CDONT mail object to send mail to you
0
lilyyanAuthor Commented:
thank you for your reply!

could you please be more specific about the different ways?

is there a built-in function in MS Word that can send the file as an email attachment ?

i'm using php. is that possible you may post a php sample, so i could better understand the process?

thank you so much !!
0
ASPSQLServerCOMCommented:
the best and fast way to generate and send the word document is
generate HTML document and then rename it to .doc and it will open up as word doc with all formatting

send email using PHP -
http://www.webcheatsheet.com/PHP/send_email_text_html_attachment.php
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

lilyyanAuthor Commented:
could you please have an example for :

>>the best and fast way to generate and send the word document is
generate HTML document and then rename it to .doc and it will open up as word doc with all formatting

i'm kind of still not sure :-)) thank you so much!!
0
ASPSQLServerCOMCommented:
once user submit the data, generate the HTML file as below then rename it to .doc extension and then send it as attachment

for test save the below code as .doc file and then open the file in word, it is very easy


<html>
<body>
<table><tr><td><b>Requested Visit Date</b></td><td></td></tr>
<tr><td>Start Time</td><td>End Time</td></tr>
</table>
</body>
</html>

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
lilyyanAuthor Commented:
well, here is several steps involved here

1. generate the HTML  // how to do this step in php

2. rename it to .doc extension . // same question as above

3.  then send it as attachment. // well, the link you posted is for text and html attachment in php, not for .doc file

thank you so much for your reply!! : )
0
ASPSQLServerCOMCommented:
Please follow the below link to generate HTML .doc file, no need to rename the file
file create
http://www.tizag.com/phpT/filecreate.php
http://www.programmingtalk.com/showthread.php?t=13635 --- here instead of creating .txt file create .doc file, also manipulate the myText code where in it writes the myText textbox content to file, instead of that write HTML tag like
"<html><body><table><tr><td><b>Requested Visit Date</b></td><td>.......CONCATE your other tag and data here



Email - for email with attachment use "Sending Email with Attachment" section
of send email using PHP -
http://www.webcheatsheet.com/PHP/send_email_text_html_attachment.php
and modify the attachment code
//and split it into smaller chunks
$attachment = chunk_split(base64_encode(file_get_contents('attachment.zip')));

or use
http://www.codewalkers.com/c/a/Email-Code/PHP-Email-Attachment-v1/

0
lilyyanAuthor Commented:
Really appreciate you reply! yet it's a little too completed ... : )
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Word

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.