[2007] VBA code replaced my subject with some value, is it posible to get back my sub
Hello All,
I was trying to add a default "Subject" for all New mails, but i did a mistake in my code which replaced all the existing mails subject in my Inbox and the same is saved. But my question is, is there any way that i can get back my old subject for all my mails in the inbox?
Here is the piece of my code :
Sub addsubject()
Dim myolapp As Outlook.Application
Dim aitem As Object
Set myolapp = CreateObject("Outlook.Application")
Set mail = myolapp.ActiveExplorer.CurrentFolder
For Each aitem In mail.Items
If InStr(aitem.Subject, "[BCD012]") > 0 Then
aitem.Subject = Left(aitem.Subject, 9)
aitem.Save
End If
Next aitem
End Sub
|