Email Excel

  • Thread starter Thread starter Hayman
  • Start date Start date
H

Hayman

Hello
I was wondering if there is a way to send and excel sheet as an attached
file without sending this file to outlook

Hayman
 
Yes, I'm trying to do that using visual basic, otherwise I would have sent
it to somewhere else.
 
Hi,

SmtpMail will send an email without outlook. It requires you to
have the SmtpMail service installed for it to work. Add a reference to
system.web.dll to your soultion.

Dim mm As New MailMessage()

mm.To = "(e-mail address removed)"

mm.From =" (e-mail address removed)"

mm.Subject = "excel file"

mm.Body = "see attached"

mm.Attachments.Add(New MailAttachment("C:\test.xls"))

SmtpMail.Send(mm)

Ken
 
Thank you Ken
Hayman

Ken Tucker said:
Hi,

SmtpMail will send an email without outlook. It requires you to
have the SmtpMail service installed for it to work. Add a reference to
system.web.dll to your soultion.

Dim mm As New MailMessage()

mm.To = "(e-mail address removed)"

mm.From =" (e-mail address removed)"

mm.Subject = "excel file"

mm.Body = "see attached"

mm.Attachments.Add(New MailAttachment("C:\test.xls"))

SmtpMail.Send(mm)

Ken
 
Back
Top