Operating system:: Windows 10
Outlook version: Outlook 365
Email type or host: Exchange
Outlook version: Outlook 365
Email type or host: Exchange
Hello all and many thanks for all past help! After searching, I believe I have found what I need to remove a phrase in emails, but when I run the code, I get the error
and this is what I see when debugging.
Here is my code:
Any suggestions would be most appreciated. Many thanks in advance!
and this is what I see when debugging.
Here is my code:
Code:
Sub Remove_OTP()
Dim arr As Variant, i As Long
arr = Array("This is where the text is.xlsx at ")
For i = 0 To UBound(arr)
oitem.Subject = Replace(oitem.Subject, arr(i), "", , , vbTextCompare)
Next
oitem.Subject = Trim(oitem.Subject)
oitem.Save
End Sub
Any suggestions would be most appreciated. Many thanks in advance!