Create folder based on senders name in the Inbox

S

S1lverface

Can anyone help. I'm new to the vba stuff..

I want to move all the e-mails from my Inbox to a folder with the same name
as the sender. I want my program to check if a folder exists for that sender,
if not create it, and move the message to that specific folder.

Could anybody give me some hints how to do this.
 
S

S1lverface

Or if possible, to use VBA to create a folder for every contact in my address
book....
 
S

S1lverface

Thanks Michael.

I'm wondering a couple of things when moving mail from my 'Inbox' to
folders. If you could help, that would be great :

1- If i receive mail from several people who all work for the same company -
Instead of using the [SenderName] = ' (e-mail address removed)', can I put a wild
card type thing to pick up the mail from all senders whose extension is
@mydomain.com or can I write [SenderName] = ' (e-mail address removed)',
[SenderName] = ' (e-mail address removed)', [SenderName] = '
(e-mail address removed)' etc

2- I also use similar code to move from my 'Sent Items' to my sent
subfolders, However, if the mail i sent had several recipients, these e-mails
are left behind. Can I write code so as it knows to move those e-mails to the
subfolder of the first recipient in the list.
 
M

Michael Bauer [MVP - Outlook]

#1: Did you look at the sample I mentioned? Simply set the value for the
Find variable, e.g. "@abc.com"

#2: Sorry, off head I don't know for sure how to determine the first
recipient in that case. You might look at the ConversationIndex and SentOn
properties.

--
Best regards
Michael Bauer - MVP Outlook
Synchronize Outlook Categories:
<http://www.vboffice.net/product.html?id=2006063&cmd=detail&lang=en&pub=6>

Am Wed, 5 Dec 2007 03:10:01 -0800 schrieb S1lverface:
Thanks Michael.

I'm wondering a couple of things when moving mail from my 'Inbox' to
folders. If you could help, that would be great :

1- If i receive mail from several people who all work for the same company -
Instead of using the [SenderName] = ' (e-mail address removed)', can I put a wild
card type thing to pick up the mail from all senders whose extension is
@mydomain.com or can I write [SenderName] = ' (e-mail address removed)',
[SenderName] = ' (e-mail address removed)', [SenderName] = '
(e-mail address removed)' etc

2- I also use similar code to move from my 'Sent Items' to my sent
subfolders, However, if the mail i sent had several recipients, these e-mails
are left behind. Can I write code so as it knows to move those e-mails to the
subfolder of the first recipient in the list.

Michael Bauer said:
Please look three days back in this ng: "Move and create folder based on
subject". Instead of Subject read the SenderEMailAddress proeprty.
Am Wed, 28 Nov 2007 09:07:04 -0800 schrieb S1lverface:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top