There are two possible ways implementing your task.
The first one is to create an Outlook rule an assign a VBA macro for running when the rule triggers. The VBA macro sub should look like the following one:
Public Sub Test(mail as MailItem)
' so something here
End Sub
The second way is to handle the NewMailEx event of the Application class. In that case there is no need to create a rule in Outlook. Your code will be triggered by the event. Here is what MSDN states:
This event fires once for every received item that is processed by Microsoft Outlook. The item can be one of several different item types, for example, MailItem, MeetingItem, or SharingItem. The EntryIDsCollection string contains the Entry ID that corresponds to that item.
The NewMailEx event fires when a new message arrives in the Inbox and before client rule processing occurs. You can use the Entry ID returned in the EntryIDCollection array to call the NameSpace.GetItemFromID method and process the item. Use this method with caution to minimize the impact on Outlook performance. However, depending on the setup on the client computer, after a new message arrives in the Inbox, processes like spam filtering and client rules that move the new message from the Inbox to another folder can occur asynchronously. You should not assume that after these events fire, you will always get a one-item increase in the number of items in the Inbox.
In the code you will need to automate Excel. The Run method of the Application class can be used to run the VBA macro programmatically.
Finally, you may find the Getting Started with VBA in Outlook 2010 article helpful.