Skip to content

Instantly share code, notes, and snippets.

@dck-jp
Last active August 29, 2015 13:56
Show Gist options
  • Save dck-jp/9105164 to your computer and use it in GitHub Desktop.
Save dck-jp/9105164 to your computer and use it in GitHub Desktop.
Create a mail by Outlook sample code (tested by Outlook2010)
Sub CreateMailByOutlook(address As String, _
subject As String, body As String)
Dim OL: Set OL = CreateObject("Outlook.Application")
Dim ML: Set ML = OL.CreateItem(olMailItem)
ML.To = address
ML.subject = subject
ML.Body = body
'ML.Save
ML.Display
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment