Find “carriage return” in a mail.body

后端 未结 3 1581
傲寒
傲寒 2021-01-21 12:39

I have mails like this :

Hello,

Please note we did ... at 16h15

Actions done: Rebuilding etc

sincerely

3条回答
  •  天命终不由人
    2021-01-21 13:34

    Loop through the body to see what the character is:

    For i = 1 To Len(.Body)
        If Not Mid(.Body, i, 1) Like "[A-Za-z0-9,'?!"".:]" Then
            Debug.Print Asc(Mid(.Body, i, 1))
        End If
    Next
    

    Once you've found the Asc() value, split the body on it and return the second index:

    TechnicAction = Split(.Body, Asc(10))(1) '// Or whatever Asc() is required
    

提交回复
热议问题