VBOffice

Expand the Subfolder When a New Message Arrives

Do you sometimes miss a new email because it's automatically moved to a closed subfolder? This macro expands the subfolder so you can see at a glance whether is has new items.

Last modified: 2013/05/23 | Accessed: 41.030  | #98
◀ Previous sample Next sample ▶
ReplyAll ReplyAll
ReplyAll alerts you before unintentionally replying all, or if you are a confidential BCC recipient of the e-mail.

You can move new emails by a rule to subfolders. However, if the folder currently isn't visible in the folder list because it's collapsed, then you cannot see if it has new unread items.

This script makes the folder visible in the folder list. Copy the script to the module "ThisOutlookSession" and add the action "run a script" to the rule.


tip  How to add macros to Outlook
Public Sub ExpandFolder(Mail As Outlook.MailItem)
  Dim F1 As Outlook.MAPIFolder
  Dim F2 As Outlook.MAPIFolder

  Set F1 = Application.ActiveExplorer.CurrentFolder
  Set F2 = Mail.Parent
  Set Application.ActiveExplorer.CurrentFolder = F2
  DoEvents
  Set Application.ActiveExplorer.CurrentFolder = F1
End Sub
SAM SAM
Determine the "identity" of your emails. Set with SAM the sender and the folder folder for sent items with the help of rules.
email  Send a message