Option Explicit Private WithEvents Items As Outlook.Items Private Sub Application_Startup() Dim Ns As Outlook.NameSpace Set Ns = Application.GetNamespace("MAPI") Set Items = Ns.GetDefaultFolder(olFolderInbox).Items End Sub Private Sub Items_ItemAdd(ByVal Item As Object) If InStr(1, Item.Subject, "Accepted: ") Then GoTo SendReply Else Exit Sub End If SendReply: Dim oRespond As Outlook.MailItem Dim RmSize As String Dim strSubject As String Dim arrRoomName As Variant Dim arrRmSize As Variant Dim i As Long Dim meetinglocation As String Dim meetingstart Dim propertyAccessor As Outlook.propertyAccessor ' http://schemas.microsoft.com/mapi/id/{00062002-0000-0000-C000-000000000046}/8208001E ' start http://schemas.microsoft.com/mapi/proptag/0x00600040 Set propertyAccessor = Item.propertyAccessor meetinglocation = propertyAccessor.GetProperty("http://schemas.microsoft.com/mapi/id/{00062002-0000-0000-C000-000000000046}/8208001E") meetingstart = propertyAccessor.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x00600040") Debug.Print meetinglocation ' Set up the array using room names and sizes ' arrRoomName = Array("Room 1", "Alpha", "Board Room", "Conference Room", "Delta", "Meeting Room - North") arrRmSize = Array("2", "3", "6", "4", "50", "35") ' Go through the array and look for a match, then do something For i = LBound(arrRoomName) To UBound(arrRoomName) If InStr(meetinglocation, arrRoomName(i)) Then RmSize = arrRmSize(i) strSubject = Format(meetingstart, "yyyymmddhhnn ") & Item.Subject ' Start Registry method ' Replace with text code if desired ' HKEY_CURRENT_USER\Software\VB and VBA Program Settings\Outlook\Meeting Counts Dim sAppName As String Dim sSection As String Dim sKey As String Dim lRegValue As Long Dim iDefault As Integer sAppName = "Outlook" sSection = "Meeting Counts" sKey = strSubject ' The default starting number. iDefault = 0 ' adjust as needed ' Get stored registry value, if any. lRegValue = GetSetting(sAppName, sSection, sKey, iDefault) Debug.Print sAppName, sSection, sKey, iDefault ' If the result is 0, set to default value. If lRegValue = 0 Then lRegValue = iDefault ' Increment and update number. SaveSetting sAppName, sSection, sKey, lRegValue + 1 If lRegValue > RmSize Then ' End Registry code Set oRespond = Application.CreateItem(olMailItem) With oRespond .Recipients.Add Item.SenderEmailAddress .Subject = "Sorry: " & strSubject .Body = " Sorry, the room is full. You're on the waiting list. " & "You are " & lRegValue - RmSize & " on the waiting list." ' use .display for testing, .send after it is working as desired '.Display .Send End With Set oRespond = Nothing End If End If Next i End Sub