Hey guys,
I've got this code below (which I got from Stack Overflow), but I cannot get it to work, just wondering if someone could please help me make some changes to get it to function.
Sub FindReplaceSubject()
Dim myMessage As Outlook.MailItem
Set myMessage = Outlook.ActiveInspector.CurrentItem
Dim subject As String
subject = myMessage.subject
subject = Replace(subject, "xxx", "111")
myMessage.subject = subject
End Sub
What I would like the code to do: find each occurance of "xxx" in the subject, and replace it with "111".
What the code does: Deletes everything in the subject.
I am quite new to VB, and I figure I am overlooking something pretty elementary... just hoping someone can show me where I am going wrong.
Thanks a lot for any help, I look forward to hearing back.