I have a html page which is attached to the email as word document.
string body = String.Empty;
body = new StreamReader("execlude.html").ReadToEnd();
byte[] data = Encoding.ASCII.GetBytes(body);
MemoryStream ms = new new MemoryStream(data);
var message = new System.Net.Mail.MailMessage(email.From, email.To);
message.Attachments.Add(new Attachment(ms, "excluded.doc", "application/msword"));
Here the attachment becomes word format, but the margin are too big. Let me know a solution to remove margins.
Thanks in advance.