Click here to Skip to main content
15,887,027 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear members ,
my application requires to send emails. the email's body needs to have a specific format.
The format and the content is defined in a MS Word document.
i can select and copy the contents of the document into the clipboard. Question is how do i send the data in the clipboard as an email BY KEEPING the format untouched.
another words, when the Emailee looks at their email, they can see the same document as i will see on my screen in MS WORD.
addition: i am programming in Visual Basic with Visual studio 2008, .NET4
thank you in advance.

Addition:
the Word document contains formatting, pictures, and colors (very standard)
i am using the following sample of code to get the contents

VB
 .
 'open the document
 aWord.Documents.Open(STR_QUOTE_NAME)
 'select the content and copy to Clipboard
 aWord.ActiveDocument.Content.Copy()
 'noW in the subroutine dedicated to sending the email
 'i do something like this
 '....

 sub Email()
 'i will skip the declarations and the neccessary server setups
 'because i have a working subroutine
 'back to the point
  message.BodyEncoding = System.Text.Encoding.UTF8
  message.Body = ClipBoard.getText
end sub

the issue is that i don't know of a way, to retrieving the data present in the clipboard, so that i could preserve its
original formatting.
doing the above will result in an email received which has little formatting.
what i have realized is that the email parsing platform(such as yahoo, hotmail , etc) will look at the header and
parse the email according to the header's Content-Type:
Posted
Updated 3-Oct-11 19:08pm
v4

1 solution

Hi,

I think you could do it by Attachment on you smtp email...

See this link if it could help....
VB
System.Net.Mail FAQ



Remember to vote if it help...

Regards,

Algem
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900