Hi all,
I use the following (Excel VB) code to send email.
But this requires 'OutLook'.
Is there a way to dynamically find (and use) any mail client ?
( It must be possible, because, if I type an e-mail id in a cell and click on that, Excel detects the default mail client of that machine and uses it to send the mail.)
thanks in advance
- sam
==================
Code segment start
==================
Private Sub Send_CommandButton_Click()
Dim OL As Object, MailSendItem As Object
Set OL = CreateObject("Outlook.Application")
Set MailSendItem = OL.CreateItem(olMailItem)
With MailSendItem
.Subject = "Subject"
.Body = "Message"
.To = "abc@xyz.com"
.cc = "abc@xyz.com"
.Send
End With
End Sub
================
Code segment End
================
I use the following (Excel VB) code to send email.
But this requires 'OutLook'.
Is there a way to dynamically find (and use) any mail client ?
( It must be possible, because, if I type an e-mail id in a cell and click on that, Excel detects the default mail client of that machine and uses it to send the mail.)
thanks in advance
- sam
==================
Code segment start
==================
Private Sub Send_CommandButton_Click()
Dim OL As Object, MailSendItem As Object
Set OL = CreateObject("Outlook.Application")
Set MailSendItem = OL.CreateItem(olMailItem)
With MailSendItem
.Subject = "Subject"
.Body = "Message"
.To = "abc@xyz.com"
.cc = "abc@xyz.com"
.Send
End With
End Sub
================
Code segment End
================