Hi ,
i have created word document dynamically and sending with email as attachment in c# asp.net.
the created document contains html controls like text area.
My Requirement is once email send to a person.. the person has to enter only in the text area .. he cannot do any changes outside of text area.
please find my code: and tell me what i need to add..
i dont want COM...Word.aspplication...
code is here
------------------------------------------------------------------------------------
StringBuilder strHTMLContent = new StringBuilder();
strHTMLContent.Append("<html><body><TEXTAREA disabled:false NAME=Name Text="+LblAttachment.Text.ToString()+"COLS=80 ROWS=6 MAXLENGTH=1000 WRAP=virtual></TEXTAREA></Body></html>");
MemoryStream objStream = new MemoryStream(Encoding.Default.GetBytes(strHTMLContent.ToString()));
ContentType objType = new ContentType("application/msword");
Attachment objAttach = new Attachment(objStream, objType);
objAttach.ContentDisposition.FileName = "Attach1.doc";
MailMessage objMesg = new MailMessage();
objMesg.Attachments.Add(objAttach);
objMesg.Body = "Hello Mail with Attachment Here";
objMesg.IsBodyHtml = true;
objMesg.Subject = "Message1";
objMesg.To.Add("..");
objMesg.From = new MailAddress("..");
SmtpClient MailClient = new SmtpClient("...");
MailClient.Send(objMesg);
------------------------------------------------------------------------------------
Kindly Help me..
How to protect the content in word document... it should not copy or change by others...except inside the text area..
Reply please..