Custom Rule

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I've created several standard rules to help keep my incoming and outgoing
messages seperated according to the company they pertain to.

Company A
In Rule: If senders address contains @acomp.com then **MOVE** to Comp A
(In) folder.

Out Rule: If recipeints address contains @acomp.com then **COPY** to Comp A
(Out) folder.

My problem is that the Rules Wizard is perfect for incoming mail as it
allows a Move option, and there's no mail in my in-box. However, there's
only a Copy option if you try to set up a rule on sent items. Therefore I
have a copy in the proper folder as well as the message still being in my
sent box.

How can I create a Custom Action that will allow for the moving of sent
messages, not just the copying of said messages?

Thank you,
Scott
(e-mail address removed)
 
You don't need a "custom action" (which you can't write with VBA anyway). All you need to do is a) go to Tools | Options | Email Options and turn off the option to save messages in the Sent Items folder and b) create the "out" rules you want and then a final catchall rule with no conditions that copies items to the Sent Items folder.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Sue,

Thank you for the quick answer. It confirmed a suspicion that I had, but my
limited knowledge of the exact processing of Outlook rules had me stumped. I
never thought with the error warnings that a rule could work if you didn't
supply options for it.

Another question on this subject.

How do I make the copies be marked as read, instead of causing Outlook to
update it's display as though there are unread messages in the destination
folder of the Out rules?

I've gone back and looked again, that is a standard option when doing a rule
that processes incoming items. It does not exist for outgoing items.

Thank you,
Scott
(e-mail address removed)
 
That would require VBA code to monitor each of the target folders for your rules with the MAPIFolder.Items.ItemAdd method and set the Unread property of each new item to False.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
SUE,
I have Outlook 2003 and I have exactly the same problem, but I don't know
well VBA.
Can you write the entire VBA code?
And another little question: To manage sended mail, Rules wizard don't allow
use "run a script" but only "run a custom action" and you write in your
previous reply "you can't write "custom action" with VBA anyway" and then:
- how to apply non standard actions to sended mail (there's a little choice
different for received mail)?
- how to use "custom actions" ?
Thank you in advance
 
Can you write the entire VBA code?

I probably could from a technical statement, but you're the one who has a vested interested interest in this and knows what folders you want to monitor. The Help topic for the MAPIFolder.Items.ItemAdd event will show you how to work with that event.
- how to apply non standard actions to sended mail (there's a little choice
different for received mail)?

Write code for the Application_ItemSend event handler, e.g.:

Private Sub Application_ItemSend _
(ByVal Item As Object, Cancel As Boolean)
If Item.Subject = "" Then
Cancel = True
MsgBox "Please fill in the subject before sending.", _
vbExclamation, "Missing Subject"
End If
End Sub

For a more elaborate version that also checks for expected attachments, see
http://www.outlookcode.com/codedetail.aspx?id=553
- how to use "custom actions" ?

Download them and follow the instructions from their developers. See http://www.slipstick.com/addins/custom.htm

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Back
Top