0

We have a requirement like we need to open default mail (what ever may be like : MS Outlook, Mozilla Thunderbird,Windows Live Mail, Opera Mail etc. ) along with to, cc, bcc, html body & attachment of active workbook on a button click in Excel using VBA.

Thanks in advance. if any one can help me.

Ranjit
  • 45
  • 6

1 Answers1

1

You can use the Shell method passing the mailto string. See How to use command line switches to create a pre-addressed e-mail message in Outlook for more information.

Also you may consider automating Outlook. See How to automate Outlook from another program for a sample code.

Community
  • 1
  • 1
Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45
  • Thank u very much Eugene Astafiev, this excel vba may run in different environments, the mail client may not be Outlook there. – Ranjit Jan 28 '15 at 12:14
  • Could you please share more how to know which mail client is there and how to execute the Shell command for different mail client as I mention in my question... – Ranjit Jan 28 '15 at 12:26
  • There is no need to detect the default email client. It will be invoked automatically using the mailto command. – Eugene Astafiev Jan 28 '15 at 14:53