[Last Call] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 198
  • Last Modified:

code to filter subject

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
1 Solution
David LeeCommented:
Greetings, zachvaldez.

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


Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now