Outlook 2010 VBA to remove delete contents in subject line

I am trying to run a Outlook rule that will run a script when receiving messages from a particular  email address.  I wan the script to delete the contents of the subject line.  Can someone help me with a script because I have never worked with VBA.  
beta2028Asked:
Who is Participating?
 
beta2028Connect With a Mentor Author Commented:
You are correct it was the Macro security.  No wonder I couldn't get any scripts to work.  One last question.  If the subject is Ticket #xxx-xxxxxxx how do I take the Ticket # out of the subject and keep the numbers?  Thanks in advance and getting this to work for me.  
0
 
Alexei KuznetsovMicrosoft Outlook MVPCommented:
Something like this:

Sub ClearSubject(Item As Outlook.MailItem)
    Item.Subject = ""
    Item.Save
End Sub

Open in new window

0
 
beta2028Author Commented:
That didn't work.  I added this to the ThisOutlookSession and then saved the code.  Then ran the script as a rule and it did not clear the subject.  I even tried to run the rule manually and it didn't clear it either.
0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

 
Alexei KuznetsovMicrosoft Outlook MVPCommented:
Believe me it works. Looks like you have macro security enabled.
0
 
Alexei KuznetsovMicrosoft Outlook MVPCommented:
Or you just misconfigured your rule.
0
 
beta2028Author Commented:
Issue resolved
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.