View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
BrianElson BrianElson is offline
external usenet poster
 
Posts: 2
Default Dropping Data to a VB.net Program

Does anybody know how to send information to a VB.NET
program. What I want to do is have VBA from excel call a
VB.NET program with and the vb.net program can them send
e-mail using the smtp server. The information from excel
would be the e-mail addresses and then the message.
There is an exaple of a vb.net program onthe MSDN web
page using web.mail. And I would like to modify it for
this use.

Dim email As New System.Web.Mail.MailMessage()
email.To = "RecipientAddress"
email.From = "SenderAddress"
email.Body = "MessageText"
email.Subject = "SubjectText"
email.BodyFormat = Web.Mail.MailFormat.Text
System.Web.Mail.SmtpMail.SmtpServer = "SmtpServerName"
System.Web.Mail.SmtpMail.Send(email)

Brian Elson