title: How to apply ItemAdd event to custom folder? Outlook 2010 VBA
body: <p>I am trying to use ItemAdd event method to monitor when new items were added to my subfolder under Inbox. </p>
  
  <p>My dir structure is like this: </p>
  
  <pre><code>- Inbox 
  - - subfolder
  </code></pre>
  
  <p>I want to run the code when new email is added to a subfolder (the reason is I am using a rule that redirects certain emails to this subfolder).</p>
  
  <p>Currently I am monitoring my Inbox using this: </p>
  
  <pre><code>Private Sub Application_Startup()
     Set olInboxItems = Session.GetDefaultFolder(olFolderInbox).items
  End Sub
  
  Private Sub olInboxItems_ItemAdd(ByVal Item As Object)
  /* Code here */ 
  End Sub 
  </code></pre>
  
  <p>but when I try to do it for a subfolder </p>
  
  <pre><code>Set subfolderItems = Session.GetDefaultFolder(olFolderInbox).Folders("subfolder").items 
  Private Sub subfolderItems_ItemAdd(ByVal Item As Object) 
  </code></pre>
  
  <p>it doesn't work. Why? How can I capture when new email is added?</p>