We help IT Professionals succeed at work.

code to filter subject

zachvaldez asked
Medium Priority
Last Modified: 2011-09-20
I only would like to filter incoming emails with subject that starts with the string "Technology" and also if the total size of the email is no more than 30 kb. Can someone show code to accomplish that?

I started with somwthing like this.... please add thanks!

 For Each olItem In olInbox.Items
      If olItem.Class = olMail  and .....Then
Watch Question

Top Expert 2010
Greetings, zachvaldez.

 For Each olItem In olInbox.Items
      If (olItem.Class = olMail)  And (Mid(olItem.Subject,1,10) = "Technology") And (olItem.Size <= 30000) Then


Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.