Assuming you have the entire message in a string variable, if you can identify some sequence of characters that introduce the part you want to chop off, then you can do it. For instance, if you want to chop off everything that begins with the last occurence of the word "Signed", this code will do it:
Code:
Dim i As Integer, j As Integer
Dim strMsg As String ' contains the message text
i = 1
Do
i = Instr(i, strMsg, "Signed")
If i = 0 Then Exit Do
j = i
i = i + Len("Signed")
Loop
If j <> 0 Then
strMsg = Left$(strMsg, j - 1)
End If
Explanation: The Do loop finds each occurrence, if any of the string "Signed". Each time it succeeds, the starting position is saved in
j. When no more occurrences are found, the loop is exited. This leaves
j containing the index of the last occurrence, if one is found; if none were found,
j will be 0, its initial value from the Dim statement.
After exiting the loop, we test to see if
j <> 0 (that is, if any occurrence was found). If so, we set
strMsg to the leftmost part of the message, up to the
j-1 position. That chops off the ending. Rick Sprague