I would like to change this macro around so that it fits the format of the list already made.
I tried to fit it in but encountered some errors with it. Here it is:
Dim para As Variant
Dim strArray() As String
Dim mai As Object
Dim strSearchFor() As Variant: strSearchFor = Array("> Email:", "> Shipping Company:", "> Tracking Number:", "> Estimated Arrival Date:", "> Contact:", "> Company Name:")
Dim strResults() As String
Dim elem As Integer
Const str2 As String = ""
Const str3 As String = ""
Const str4 As String = ""
eWindow) = "Explorer" Then
Set mai = Application.ActiveExplorer
eWindow) = "Inspector" Then
Set mai = Application.ActiveInspecto
strArray = Split(.Body, vbCrLf)
For Each para In strArray
If para <> "" Then
For elem = LBound(strSearchFor) To UBound(strSearchFor)
If LCase(Left(para, Len(strSearchFor(elem)))) = LCase(strSearchFor(elem)) Then strResults(elem) = Trim(Split(para, ":")(1))
Set mai = Nothing
If strResults(0) = "" Then Exit Sub
' Only proceed if we have an email address!
Set mai = Application.CreateItem(olM
.To = strResults(0)
.Subject = mai.Subject
.Body = "Dear " & Split(strResults(4) & " ", " ")(0) & vbCrLf & vbCrLf & _
"Please find attached a photo of the first unit our production has made of your order and kindly confirm it is to your satisfaction before we proceed. If you have any other questions with this order, do not hesitate to ask. " & vbCrLf & vbCrLf & _
"Best regards," & vbCrLf & _
"Derek" & vbCrLf & vbCrLf & _
"Derek Sheahan | Sales Manager TLN Group| tlngroup.com|" & vbCrLf & _
"|email@example.com | Phone: (1800) 385 8156 | Fax : (1888) 429 7748" & vbCrLf & _
"420-2906 West Broadway, Vancouver , BC, V6K 2G8, Canada"
I would like to change this to editone and also make one change to it so that it takes the attachments from the current mail selected and adds them to the new mail being created.