Dropping Data to a VB.net Program

B

BrianElson

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
 
B

BrianB

In the absence of another reply, I don't know the answer either. Yo
might get beter response from a forum that deals with VB.NET.

I assume you know that it is possible to send emails from within Exce
(MS Office) itself - there are numerous code examples available
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top