Re: Auto create folder based on subject or body text
- From: "Michael Bauer" <mib00@xxxxxxxxxxx>
- Date: Sun, 3 Jul 2005 08:51:58 +0200
It does matter. If the code runs on the server then you will be able to
catch every message. If not then it´s necessary that OL is running.
For the OL side solution: For handling each incoming mail you can use
the Inbox´ ItemAdd event. (These event won´t fire if there are more than
16 items coming in at once).
For searching in the subject or body use the InStr function. If there´s
a match then call the folder´s Folders.Add function to create a
subfolder. Moving the mail works with MailItem.Move.
Please see also the VBA help for samples for the mentioned functions.
A really simple solution for deleting not used folders could be this:
Delete them each time OL starts if the folder is empty (Items.Count=0).
It doesn´t matter if a new e-mail comes in one minute later for that
folder because the folder will be created automatically again.
--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
Joemonkey wrote:
> I suppose it doesn't really matter where the rule or code occurs.
> Right now we have a program called Notice Organizer Pro that does
> this for us on an Outlook 2003 install, but the program is messing up
> and is discontinued. I would also like to be able to delete the
> folders created if they remain empty for x amount of time.
>
> "Michael Bauer" wrote:
>
>> Ah, so you probably need the code running on the server and not in
>> OL. Info about that you can find on Sue´s site:
>> http://www.outlookcode.com/d/exstech.htm
>>
>> --
>> Viele Gruesse / Best regards
>> Michael Bauer - MVP Outlook
>>
>>
>>
>> Joemonkey wrote:
>>> We are on Exchange 2003 and have mixed Outlook 2002/2003 installs.
>>> We only need one mailbox to do this, and it currently has 2003
>>> installed but we could do 2002 if necessary.
>>>
>>> "Michael Bauer" wrote:
>>>
>>>> What version do you use?
>>>>
>>>> --
>>>> Viele Gruesse / Best regards
>>>> Michael Bauer - MVP Outlook
>>>>
>>>>
>>>>
>>>> Joemonkey wrote:
>>>>> Does anyone know how to program a rule into Outlook so it will
>>>>> create a subfolder based on something in the message subject or
>>>>> body? Like if I had a fruit vendor send me an email based on
>>>>> apples, I would have a rule create a subfolder named apples and
>>>>> move the emails with apples in the subject line to that folder.
>>>>> The next day he sends me something about bananas so Outlook
>>>>> creates a bananas subfolder and moves the email there. Obviously
>>>>> the fruit vendor and I would agree on a standard for sending
>>>>> emails to do this.
.
- References:
- Re: Auto create folder based on subject or body text
- From: Michael Bauer
- Re: Auto create folder based on subject or body text
- From: Joemonkey
- Re: Auto create folder based on subject or body text
- Prev by Date: How to Drag and Drop email message into VB app.
- Next by Date: Re: How to Drag and Drop email message into VB app.
- Previous by thread: Re: Auto create folder based on subject or body text
- Next by thread: Re: re:Send OL Mail Item Plain Text Only-VBA in OL2K
- Index(es):
Relevant Pages
|
Loading