Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Outlook Rules

Status
Not open for further replies.

simoncpage2

Programmer
Feb 21, 2004
37
0
0
Is there a way to write rule or is there a custom action for a rule I can buy which will change the sending account based on the email address?

Any help would be great

Thanks
Simon
 
Hi there.
Could you give a bit more info. please? Do you want to change who an email is sent to depending on who sends it?
 
I have solved it with a vba addin:

Thanks anyway.


Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)

Dim loMailItem As Outlook.MailItem

If Item.Class = olMail Then
If InStr(Item.To, "aol") Or InStr(Item.CC, "aol") Or InStr(Item.BCC, "aol") Then
Set_Account "pop.account.net", Application.ActiveInspector.CurrentItem
Else
End If
End If
Set Item = Nothing

End Sub
 
Hi; I'm very new to VBA addins; how do I create this an make it run in real time? Is there a FAQ I should be looking at?

Thanks,
Matthew

Matt H.
TMC - KCMO, USA
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top