by Chris Goller (1 Submission)
Category: Internet/HTML
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Thu 1st November 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Email with MAPI. Simply add the code to a form and run it.
With MAPISession1
.DownLoadMail = False
.LogonUI = True
.SignOn
MAPIMessages1.SessionID = .SessionID
ComposeMessage
End With
End Sub
Private Sub ComposeMessage()
On Error GoTo ComposeErr
Dim subjecttxt As String
Dim address As String
subjecttxt = "insert subject text here"
address = "insert address here"
With MAPIMessages1
.Compose
.RecipDisplayName = address
.MsgSubject = subjecttxt
.ResolveName
.Send True
End With
Exit Sub
ComposeErr:
Debug.Print Err.Number, Err.Description
Resume Next
End Sub