Outlook Folder

syed_mushraf

Active Member
Joined
Oct 13, 2002
Messages
265
I have different folders in the InBox as per the sender name. My requirment is to auto receive email in it by its respective name. Currently i need to forward it manually. plz help
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Look into setting up a rule on email from those people. Rules will automatically send email as it is received into any folder you specify. You can also set flags and read status or even automatically "Delete" emails from a person you deem necessary. ;?)

Tyoe email rules in Outlook help and it will show you how to set one up.
 
Upvote 0
Hi,

In Yahoo mail you can go to opetions and select Filter and do your own settings like Sort your incoming mail automatically into designated folders.

Hope this will help.

Thanks
Manu
 
Upvote 0
You might fine that Views/Current Views ... By Sender does what you want without making the folders. Or, if you do not want to set a load of individual rules, try this :-
Code:
'=============================================
'- SORT INBOX EMAILS INTO NAMED FOLDERS
'=============================================
Dim MyOlApp As Object
Dim MyNamespace As Object
Dim MyMailFolder As Object
Dim MyName As String
Dim MailBoxName As String
Dim MyMailItem As Object
Dim MailBody As String
Dim MailSenderName As String
Dim NameFolder As Object
Dim Counter As Integer
'-----------------------------------------------------------------------
Sub InboxTransfer()
    Set MyOlApp = CreateObject("Outlook.Application")
    Set MyNamespace = MyOlApp.GetNamespace("MAPI")
    MyName = MyNamespace.CurrentUser
    MailBoxName = "Mailbox - " & MyName
    Set MyMailFolder = MyNamespace.Folders(MailBoxName).Folders("Inbox")
    '-------------------------------------------------------------------
    '- CHECK EMAILS IN INBOX
    Counter = 0
    For i = 1 To MyMailFolder.Items.Count
        Set MyMailItem = MyMailFolder.Items(i)
        MailSenderName = MyMailItem.SenderName
        Application.StatusBar = " Checking mail for " & MailSenderName _
            & "     Found " & Counter & " so far.)"
        '----------------------------------------------------------------
        '- Try to set folder & trap error if it does not exist
        On Error Resume Next
        Set NameFolder = _
            MyNamespace.Folders(MailBoxName).Folders(MailSenderName)
        If Err.Number <> 0 Then
            Err.Clear
            rsp = MsgBox("Folder for " & MailSenderName _
                & " does not exist.", vbCritical + vbOKCancel)
            If rsp = vbCancel Then GoTo ClearObjects
        Else
            MyMailItem.Move NameFolder
            Counter = Counter + 1
        End If
    Next
    '-------------------------------------------------------------------
    '- FINISH
    MsgBox ("Transfer complete. " & Counter & " emails.")
    Application.StatusBar = False
    '-------------------------------------------------------------------
ClearObjects:
    Set MyMailItem = Nothing
    Set MyNamespace = Nothing
    Set MyOlApp = Nothing
End Sub
 
Upvote 0
Use Alt +F11 keys from Excel to get the VB Editor
Insert/Module
Copy/paste code from here.
THe module becomes part of the workbook when it is saved.
 
Upvote 0

Forum statistics

Threads
1,224,862
Messages
6,181,466
Members
453,045
Latest member
Abraxas_X

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top