1) Create or open the Outlook profile that has a single account for your
bureau mailbox. Create a server-side Rule that forwards alll e-mails to your
other e-mail address. This way you don't have to write any code at all.
2) You'll have to loop through the Items collection for the folder
containing the duplicate e-mails. For each mail item you retrieve during the
loop, use the Restrict method with the Subject property where the matching
criteria is the value of the current message's Subject. This will give you a
set of e-mails that have the same subject. You can then loop through this
new Items collection to compare other properties to see if they are
duplicates e-mails. Take caution because a valid e-mail conversation thread
will have many e-mails with the same Subject value. If you do find
duplicates, delete them from the filtered Items collection. Note also that
you'll have to loop through any collection that you intend on deleting from
using this technique:
For intX = Items.Count To 1 Step -1
Next
--
Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog:
http://blogs.officezealot.com/legault/
"RenaatLanduyt" wrote:
I have two minor questions about outlook macro’s or VBA code:
1/
I have two mailboxes: one shared for my bureau, and one personal mailbox. I
almost never check the bureau-mailbox, but sometimes it contains important
mails.
I want to do the following: forward all the mails that are send to the
bureau-mailbox and NOT to my personal mailbox.
Note however that sometimes my address is a part of a group (eg. My mail
address is a member of â€).
How can I make such a code which runs automatically on every incoming mail?
Is it correct that this should be VBA code and not a macro?
We’re using MS-exchange, outlook 2003.
2/
I have a huge *.pst file with a entire tree of folders.
Some identical mails appear in different folders. This is OK.
Some identical mails also appear in the same folder. This is not OK.
I want to make code that searches in each folder and removes the duplicates
in the folder. The “cross-folder-duplicates†should not be removed.
I searched a lot already, because I supposed such a macro should be on the
internet, but I didn’t found any.
Thanks in advance.