M
mjj4golf
I have a button on a form which is to send email to clients in a table.
I got some of the code idea from msdn
http://msdn2.microsoft.com/en-us/library/ms268749.aspx
The following is a snippet of it. I understand all except the Dim email As
Outlook.MailItem ...... Could someone explain? Do I need it to do the
send of the email? What's it for?
Private Sub CreateEmailItem(ByVal subjectEmail As String, _
ByVal toEmail As String, ByVal bodyEmail As String)
Dim eMail As Outlook.MailItem = Me.CreateItem _ <<<<<< ??????
(Outlook.OlItemType.olMailItem)
With eMail
.Subject = subjectEmail
.To = toEmail
.Body = bodyEmail
.Importance = Outlook.OlImportance.olImportanceLow
.Send()
End With
End Sub
Mike
I got some of the code idea from msdn
http://msdn2.microsoft.com/en-us/library/ms268749.aspx
The following is a snippet of it. I understand all except the Dim email As
Outlook.MailItem ...... Could someone explain? Do I need it to do the
send of the email? What's it for?
Private Sub CreateEmailItem(ByVal subjectEmail As String, _
ByVal toEmail As String, ByVal bodyEmail As String)
Dim eMail As Outlook.MailItem = Me.CreateItem _ <<<<<< ??????
(Outlook.OlItemType.olMailItem)
With eMail
.Subject = subjectEmail
.To = toEmail
.Body = bodyEmail
.Importance = Outlook.OlImportance.olImportanceLow
.Send()
End With
End Sub
Mike