![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Hy together,
im getting really mad with VBA in Outlook 2003. Im trying to check when a mail has been send from which account it was send. After that I want to move the sent mail in a special folder if the sender is .... Im trying it with this code.... Option Explicit Public WithEvents SentItems As Outlook.Items Private Sub Application_Startup() Set SentItems = _ Outlook.Session.GetDefaultFolder(olFolderSentMail) .Items End Sub Private Sub Application_Quit() Set SentItems = Nothing End Sub Private Sub SentItems_ItemAdd(ByVal Item As Object) Select Case Item.From Case " ' folder1 Item.Move Outlook.Session.GetDefaultFolders(olFolderInbox).F olders("TEST") Case " ' folder2 Item.Move Outlook.Session.GetDefaultFolders(olFolderInbox).F olders("TEST2") Case Else ' Leave it in the top Inbox Item.Move Outlook.Session.GetDefaultFolders(olFolderInbox) End Select End Sub Can someone help me please!!! Thanks really for any suggestion.... |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to move send mails to secondary mailbox | Gvaram | Outlook and VBA | 4 | October 3rd 06 05:45 AM |
move account to another computer | Leslie | Outlook - Using Contacts | 4 | February 28th 06 04:39 PM |
Outlook 2003 changes the outgoing account when unable to send by selected account | HeidarV | Outlook - General Queries | 1 | January 16th 06 02:26 PM |
Outlook 2003 changes the outgoing account when unable to send by selected account | HeidarV | Outlook - General Queries | 0 | January 14th 06 08:44 AM |