write a rule for blank subject line

G

Guest

OS = XP professional
Outlook = 2000 SP

Topic: I'm being hit by junk email that has no subject line. I want to write
a rule to delete all email without a subject line, but have been unable to do
so. Suggestions?

Thank you.
 
G

Guest

We can accomplish this with a bit of simple scripting attached to a rule.
The script is below. Follow these instructions to use it.

1. Start Outlook.
2. Click Tools->Macro->Visual Basic Editor.
3. If not already expanded, expand Modules and click on Module1.
4. Copy the code below and paste it into the right-hand pane of the VB
Editor.
5. Click the diskette icon on the toolbar to save the changes.
6. Close the VB Editor.
7. Click Tools->Macro->Security.
8. Change the Security Level setting to Medium.
9. Create a rule that runs when a new message arrives. Set the rule to run
the macro.

Sub MessagesWithBlankSubjects(Item As Outlook.MailItem)
'If the subject line is empty
If Item.Subject = "" Then
'Move the message to Deleted Items
Item.Move Session.GetDefaultFolder(olFolderDeletedItems)
End If
End Sub
 
B

Brian Tillman

ckraymond said:
OS = XP professional
Outlook = 2000 SP

Topic: I'm being hit by junk email that has no subject line. I want
to write a rule to delete all email without a subject line, but have
been unable to do so. Suggestions?

Create a rule that deletes (or moves to another folder) ALL incoming mail,
but add an exception to it that says "except with specific words in the
subject" and make those specific words "a", "e", "i", "o", "u", or "y".
That way any messages whose subject contains a legitimate English word will
be retained, but any message whose subject is blank, all digits, all
punctuation, strings containing no vowels, or any combination of those last
three will be deleted (or moved).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top