Send mail using default client

G

Guest

I want to send an email with attachments using the default email client
through VBA.
My current program sends the mail using Microsoft outlook.

Is there any way through which I can send an email with an attachment using
the default email client which can be lotus notes, Netscape email client etc.

My current code goes like this:

Dim OutApp As Object
Dim OutMail As Object
Dim sh As Worksheet
Dim samp As String
With Application
..EnableEvents = False
..ScreenUpdating = False
End With
Set sh = Sheets(1)
Set OutApp = CreateObject("outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)
With OutMail
..To = "(e-mail address removed)"
..Subject = “Subject lineâ€
..Attachments.Add “C:/text.txtâ€
..Body = "Text in body"
..Display
 

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