title: Outlook VBA to change subject, move email, and create task upon incoming email
body: <p>So I've got some basics down, but I can't figure out how to do some things like create a task or move the email. I created a script to update the subject manually, but that isn't helping me in my end goal.</p>
  
  <p>Prob not the best way to do this, but it works. Basically I need to make this fire off when a new email is received, edit the subject like below, move it to a sub folder.... let's call it 1, and create a 2 day task to complete.</p>
  
  <pre><code>Sub ChangeSubjects()
  Dim Item As Outlook.MailItem
  Dim oInspector As Inspector
  Dim oExplorer As Explorer
  Dim oCt As Integer
  Dim cCt As Integer
  Dim iSubject As String
  Set oInspector = Application.ActiveInspector
  Set oExplorer = Application.ActiveExplorer
  cCt = 1
  oCt = oExplorer.Selection.Count
  
  For Each Item In Application.ActiveExplorer.Selection
      If oInspector Is Nothing Then
         Set Item = Application.ActiveExplorer.Selection.Item(cCt)
         Item.Display
         Set oInspector = Application.ActiveInspector  'Reassign oInpsector and Item again
         Set Item = oInspector.currentItem
      Else
          Set Item = oInspector.currentItem
      End If
  
      If Left(Item.Subject, 27) = "Look for this string" Then Item.Subject = Mid(Item.Subject, 29)
          Item.Close (2)
      Set oInspector = Application.ActiveInspector
      cCt = cCt + 1
  Next
  End Sub
  </code></pre>