maxx_daddy
Board Regular
- Joined
- Dec 3, 2010
- Messages
- 74
hi smart peoples. I am trying to automate a response system for following up on quotes. This is working with the lone exception that my second followup is cramming the first and second e-mail into one long e-mail...... is there a simple way that I have missed in my code or is the correct solution to make a macro for each different e-mail that I wish to send.
Sub SendEmail()
Dim OutlookApp As Outlook.Application
Dim MItem As Outlook.MailItem
Dim cell As Range
Dim Subj As String
Dim EmailAddr As String
Dim Recipient As String
Dim Msg As String
Dim Msg2 As String
'Create Outlook object
Set OutlookApp = New Outlook.Application
'Loop through the rows
For Each cell In Columns("e").Cells.SpecialCells(xlCellTypeVisible)
If cell.Value Like "*@*" Then
EmailAddr2 = EmailAddr2 & ";" & cell.Value
End If
Next
Msg = Msg & "Good Morning!!" & vbCrLf & vbCrLf & "Just making sure you got the quote we sent out. When you get a moment, give me a call and we’ll go over it together." & vbCrLf & "If it looks good, just sign and send it back, and we’ll get it going for you right away." & vbCrLf & vbCrLf & "Thanks!" & vbCrLf & vbCrLf & "Joe Nelson" & vbCrLf & "Rinderle Door Company" & vbCrLf & "Phone (262)-662-5200" & vbCrLf & "Fax (262) 662-5295" & vbCrLf & "E-mail joe@rinderledoor.com"
Subj = "Just making sure we're all good....."
'Create Mail Item and view before sending
Set MItem = OutlookApp.CreateItem(olMailItem)
With MItem
.To = EmailAddr1
.BCC = EmailAddr2
.Subject = Subj
.BodyFormat = 2
.Body = Msg & vbCrLf
.Display
.Send
End With
'Create Outlook object
Set OutlookApp = New Outlook.Application
'Loop through the rows
For Each cell In Columns("f").Cells.SpecialCells(xlCellTypeVisible)
If cell.Value Like "*@*" Then
EmailAddr2 = EmailAddr2 & ";" & cell.Value
End If
Next
Msg2 = Msg & "Good Morning!" & vbCrLf & vbCrLf & "Hopefully you got the quote we sent out." _
& vbCrLf & "We are looking forward to working with you on this project." _
& vbCrLf & "Any questions, give me a call!" & vbCrLf & vbCrLf & "Thanks!" & vbCrLf & vbCrLf _
& "Joe Nelson" & vbCrLf & "Rinderle Door Company" & vbCrLf & "Phone (262)-662-5200" & vbCrLf & _
"Fax (262) 662-5295" & vbCrLf & "E-mail joe@rinderledoor.com"
Subj = "It's your turn......"
'Create Mail Item and view before sending
Set MItem = OutlookApp.CreateItem(olMailItem)
With MItem
.To = EmailAddr1
.BCC = EmailAddr2
.Subject = Subj
.BodyFormat = 2
.Body = Msg2 & vbCrLf
.Display
.Send
End With
End Sub
thanks, MAXXDADDY
Sub SendEmail()
Dim OutlookApp As Outlook.Application
Dim MItem As Outlook.MailItem
Dim cell As Range
Dim Subj As String
Dim EmailAddr As String
Dim Recipient As String
Dim Msg As String
Dim Msg2 As String
'Create Outlook object
Set OutlookApp = New Outlook.Application
'Loop through the rows
For Each cell In Columns("e").Cells.SpecialCells(xlCellTypeVisible)
If cell.Value Like "*@*" Then
EmailAddr2 = EmailAddr2 & ";" & cell.Value
End If
Next
Msg = Msg & "Good Morning!!" & vbCrLf & vbCrLf & "Just making sure you got the quote we sent out. When you get a moment, give me a call and we’ll go over it together." & vbCrLf & "If it looks good, just sign and send it back, and we’ll get it going for you right away." & vbCrLf & vbCrLf & "Thanks!" & vbCrLf & vbCrLf & "Joe Nelson" & vbCrLf & "Rinderle Door Company" & vbCrLf & "Phone (262)-662-5200" & vbCrLf & "Fax (262) 662-5295" & vbCrLf & "E-mail joe@rinderledoor.com"
Subj = "Just making sure we're all good....."
'Create Mail Item and view before sending
Set MItem = OutlookApp.CreateItem(olMailItem)
With MItem
.To = EmailAddr1
.BCC = EmailAddr2
.Subject = Subj
.BodyFormat = 2
.Body = Msg & vbCrLf
.Display
.Send
End With
'Create Outlook object
Set OutlookApp = New Outlook.Application
'Loop through the rows
For Each cell In Columns("f").Cells.SpecialCells(xlCellTypeVisible)
If cell.Value Like "*@*" Then
EmailAddr2 = EmailAddr2 & ";" & cell.Value
End If
Next
Msg2 = Msg & "Good Morning!" & vbCrLf & vbCrLf & "Hopefully you got the quote we sent out." _
& vbCrLf & "We are looking forward to working with you on this project." _
& vbCrLf & "Any questions, give me a call!" & vbCrLf & vbCrLf & "Thanks!" & vbCrLf & vbCrLf _
& "Joe Nelson" & vbCrLf & "Rinderle Door Company" & vbCrLf & "Phone (262)-662-5200" & vbCrLf & _
"Fax (262) 662-5295" & vbCrLf & "E-mail joe@rinderledoor.com"
Subj = "It's your turn......"
'Create Mail Item and view before sending
Set MItem = OutlookApp.CreateItem(olMailItem)
With MItem
.To = EmailAddr1
.BCC = EmailAddr2
.Subject = Subj
.BodyFormat = 2
.Body = Msg2 & vbCrLf
.Display
.Send
End With
End Sub
thanks, MAXXDADDY