PDA

View Full Version : Search body text and set another email as read



woodpecker
06-11-2009, 11:46 AM
Hi folks,

I've had a browse through the forum but not really found what I need, I am a real noob at this and need some help.

When emails come in they are moved into two folders, one called payments, one called orders. I want to loop all unread emails in the orders folder, print them and at the same time read a transaction number from the subject. I then want to use this transaction number to mark the appropriate payment email as status read, in the payment email the transaction number will be in the body.

In other words I want to change this into vba:-

foreach unread mail in orders folder
print email
set variable to transaction no. in title
for each mail in payments folder
check body for transaction no.
if transaction no. = variable set above
set payment email as read
loop
loop

Can someone please translate this into some vba to get me going.

Thanks,
Woody.