>Thank you very much for the sample code. And I will look for the article when it comes out. If I may ask you one more question, please After you save the resulting code to a file (as pointed in your code), how do you attach it to an email message? When I attach a file to an email message (I use Outlook), the attachment goes as attachment. But I would want this saved file to be the body of the email message.
For that, you will also need to have something better. I recommend using Imports System.Net.Mail and Imports System.IO for sending emails. It will provide you full flexibility. You would then be able to manipulate everything much better. This one is an old article but it is pretty close to what I have now:
http://www.levelextreme.net/ViewPageArticle.aspx?Session=73455372576E464A7471633D2077397635614137594C67304E435961307254624542413D3D>PS. If you have a draft of the article you plan to publish in .NET Magazine and want someone to proof read it, please email it to me; I will be glad to proof read it {g}.
We might need some help at that level. So, if you are interested, I will let you know by email on how to get involved.