matching contents in 2 outlook folders

  • Thread starter Thread starter GJHome
  • Start date Start date
G

GJHome

i have two inbox folders - one called passed and another called rejected.
within each are emails with an reference number as the subject.

i want to programmatically scan these two inboxes for the same reference. if
a reference is found then i want to move the relevant email out of the
rejected folder into another folder - called queried.

can this be done using outlook vbscript ?

or could you just tell me how to compare the contents of two folders


many thanks
 
Pseudo code

Get Passed folder [1]
Get Rejected folder
Get Queried folder
Get first item in first folder [2]
Get subject from first item [3]
Check for matching item in Rejected folder [4]
Move matching item [5]

[1] See http://www.slipstick.com/dev/code/getfolder.htm

[2] Use a For Each ... Next loop

[3] Item.Subject -- see http://www.slipstick.com/dev/propsyntax.htm

[4] MAPIFolder.Items.Find method

[5] MailItem.Move method

--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 
Back
Top