When i designed the logic of my code I made the mistake of not adding the email address from the sender before hand! So as an after thought I have put the email address from the sender, and would like to included in the "else", but run the code from the if (so going back)!!!
Here is the code anybody know how to do that?
Here is the code anybody know how to do that?
HTML:
[QUOTE]the code above declares the variable "sender" and contains the email address from the sender.[/QUOTE]
If InStr(MItem.body, "@") Then ' If MItem.body contains an @ character
'Assign each word in the body of the email to Ewords
MItem.unread = "False"
Ewords = Split(MItem.body) ' Split each word in MItem.body and assign it to the Ewords variable
For i = LBound(Ewords) To UBound(Ewords) ' sets the for i loop to the number of split in MItem
If InStr(Ewords(i), "@") Then 'Found the string that contains an email address
'clean the email address
Call EmailAddresCleanup(Ewords(i))
[QUOTE]This is where I would like to "else" from below to start from, not going through the else again of course.[/QUOTE]
ReDim Preserve temparray(2, mea)
'look into my array to see if the email is already there?
If temparray(LBound(temparray), LBound(temparray)) <> "" Then 'compare emails
For j = LBound(temparray, 2) To UBound(temparray, 2)
If temparray(1, j) = emailclean Then temparray(2, j) = Status: t = "true" 'update its status only
Next j
End If
If t <> "true" Then ' No match was found so writing the new email and status
temparray(1, mea) = emailclean
temparray(2, mea) = Status
mea = mea + 1
Else
t = ""
End If
Else
' No emails were found in the string, look at next string
End If
Next i 'Next String in body of email
'MsgBox MItem
Else
'MsgBox "No email in the body, need to find the code to grab it from the 'from'"
[QUOTE]Use the "sender" email and run it through the code above. [/QUOTE]
End If