title: Alert user when the user manually moves an email to an Archive folder
body: <p>I have found myself accidentally moving email items to an Archive folder instead of the standard folder in MS Outlook.  For example, for an email address of Example@Email.Com, I open the Archive to locate an old email in folder "KeepThis" but then I forget to collapse the Archive folder and so I inadvertently move some other email message later on into the Archive/KeepThis folder when I really wanted to move it to the Example@Email.Com/KeepThis folder.</p>
  
  <p><strong>Is there a way to use VBA code to alert the user when an email item is manually moved into an Archive folder?</strong></p>
  
  <p>I tried unsuccessfully to modify the code by @thims at <a href="https://superuser.com/questions/929726/create-outlook-rule-which-runs-after-move-mail-to-specific-folder" title="create-outlook-rule-which-runs-after-move-mail-to-specific-folder">create-outlook-rule-which-runs-after-move-mail-to-specific-folder</a> to show a msgbox, but could not figure out how to get it to trigger when I moved a mail item to <em>any</em> folder in either my main email folder nor in the Archive.</p>
  
  <p>Here is what I've tried:</p>
  
  <p>(1) I added the following code to ThisOutlookSession (obviously with my actual email address):</p>
  
  <pre><code>Public WithEvents FolderItems As Outlook.Items
  
  Private Sub Application_Startup()
     Set FolderItems = Session.Folders("Example@Email.Com").Folders("Misc").Items
  End Sub
  
  Private Sub FolderItems_ItemAdd(ByVal Item As Object)
      MsgBox "ItemAdd event was triggered in folder Misc"
  End Sub
  </code></pre>
  
  <p>That works <em>if</em> I move an email item into the "Misc" folder in my non-archived email account.  Yay.  </p>
  
  <p>But, I cannot figure out how to set the FolderItems object to trigger when an email is moved to <em>any</em> folder.</p>
  
  <p>(2) I can reference the general Archive folder by using:</p>
  
  <pre><code>Set FolderItems = Session.Folders("Archives").Folders("Misc").Items
  </code></pre>
  
  <p>But, that only triggers if I move something to the specific "Misc" folder in Archives and I want to trigger the event when an email is moved to <em>any</em> Archive folder, not just the "Misc" folder.</p>
  
  <p>I've tried </p>
  
  <pre><code>Set FolderItems = Session.Folders("Archives").Items
  </code></pre>
  
  <p>but that does not work--there's no error, it just does not trigger when I move an email into any folder, nor does it trigger when a new folder is added/created in Archives; so, I'm not sure what will trigger with that code.</p>
  
  <p>Thanks for any pointers to get things further along!</p>