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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Outlook Rule- multiple mailboxes

Status
Not open for further replies.

drkestrel

MIS
Sep 25, 2000
439
GB
Set up
Server- Exchage 2000.
Client- Outlook XP SP2

Email accounts on client:
1) 1 POP3/SMTP account
2) 1 Exchange Account:
2.1) default mailbox= username
2.2) Additional mailbox opened= anothermailbox

I want to set up something on mailbox such that all mails From field=anothermailbox@mycompany.com in kept in the sent mail folder in anothermailbox.

Problems
1) Using the rules wizard, it doesn't pick up From field!
2) It always only allow "move a copy". I want the mail physically moved!

How could I resolve the problems?
 


Run up Tools->Rules Wizard.
Click New and select 'Start from a blank rule' and check messages when they arrive.

Click Next.

Tick From 'people or distribution list' and enter a value.

Click Next.

Check 'move it to the specified folder' and set the folder name.

Click Next.

Set up any other fields you need and then hit the Finish button.

hope this helps

Les....

 
Thanks Les, but I think you might have missed my point.

I want to move mail I sent out as anothermailbox@mycompany.com to the specified folder. (Not as you suggested moving mail I received from anothermailbox@mycompany.com to the specified folder. When I select
Code:
check messages after sending
, I have no option to pick
Code:
From 'people or distribution list'
!!

:-(
 
Sorry. It was it bit early!

Run up Tools->Rules Wizard.
Click New and select 'Start from a blank rule' and 'check messages after sending'.

Click Next.

Here I have a 'Through The Specified Account'box to tick. Would this not do the job?

Les....

 
No good unfortunately, :-(

cos, both mymailbox@mycompany.com and anothermailbox@mycompany.com is under the same exchange account!
 
Okay then. How about some vba. A bit buggy I'm afraid and fails to move all items for some reason that escapes me for the moment.

Perhaps it could run for each mail sent or just periodicaly.

' Needs a folder creating in Sent Items entitled 'From Fred'
' and SenderName setting appropriately

Sub MovEmToAnotherFolder()
Dim oApp As Application
Dim myFolder As Outlook.MAPIFolder
Dim oFolder As Outlook.MAPIFolder
Dim oMsg As MailItem
Dim oNS As NameSpace
Dim oObject As Object
Dim SenderName As String

SenderName = "Bloggs Fred"

Set oApp = New Outlook.Application
Set oNS = oApp.GetNamespace("MAPI")
Set oFolder = oNS.GetDefaultFolder(olFolderSentMail)
Set myFolder = oFolder.Folders("From Fred")

' Blows up on last entry with type mismatch ignore for now.
On Error Resume Next

For Each oMsg In oFolder.Items
Debug.Print "xx=" & oMsg.SenderName
If oMsg.SenderName = SenderName Then oMsg.Move myFolder
Next
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top