I recently updated to Office 2010 and did not have any problem with this e-mail code in 2003. Now my addresses are not looking correct:
jgross978@gmail.com#mailto:jgross978@gmail.com#; dmillett@masiello.com#mailto:dmillett@masiello.com#;
What is causing this?
Dim rs As DAO.Recordset
Set rs = Me.FrmSubRealtors1.Form.RecordsetClone
Dim tostr As String
Dim mess_body As String
Dim appOutlook As Outlook.Application
Dim MailOutlook As Outlook.MailItem
Set appOutlook = CreateObject("Outlook.Application")
Set MailOutlook = appOutlook.CreateItem(olMailItem)
If rs.EOF = False Then
rs.MoveFirst
Do Until rs.EOF
If rs.Fields!Email <> "" Then
tostr = tostr & rs.Fields!Email & ";"
End If
rs.MoveNext
Loop
tostr = Left(tostr, Len(tostr) - 1)
rs.Close
Set rs = Nothing
mess_body = "PeoplesBank Mortgage Consultant"
Set appOutlook = CreateObject("Outlook.Application")
Set MailOutlook = appOutlook.CreateItem(olMailItem)
With MailOutlook
.To = smcgrath@bankatpeoples.com
.BCC = tostr
.Subject = mess_body
.Display
End With
End If