• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2144
  • Last Modified:

Macro to accomplish "mailto" command in excel

I want to create a button on an excel sheet that will do the same thing as the "mailto" link. I want the macro to simply pop open an Outlook email window and populate the address list which will be coded manually.

Seems pretty straight forward but I cannot find anything on the internet about it.

Thanks in advance!
1 Solution

pls try

Sub OpenOutlookMail()
Dim OutApp As Outlook.Application
Dim OutMail As Outlook.MailItem

Set OutApp = CreateObject("Outlook.Application")

Set OutMail = OutApp.CreateItem(olMailItem)
With OutMail
    .To = ""
    .Subject = ""
    .Body = ""

End With
End Sub

Open in new window

Do not forget to reference the MS Outlook Objet Library

filtrationproductsAuthor Commented:
Perfect, Thank you!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now