
Public Sub WatchForAppt(Item As MailItem) Changing these macros to work in a run a script rule simple: remove the application_startup macro, change the name from Private Sub olInbox_ItemAdd(ByVal Item As Object) to The macros above are ItemAdd macros, meaning the macro watches the Inbox (or another folder) and checks each message that is added to the folder. '.RequiredAttendees = Item.SenderEmailAddress If i = 3 Then strLocation = Trim(M.SubMatches(1)) If i = 2 Then sDate = Trim(M.SubMatches(1)) If i = 1 Then strSubject = Trim(M.SubMatches(1)) Set Reg1 = CreateObject("VBScript.RegExp") This code uses appointment data in the message body to create the appointment. RequiredAttendees = Item.SenderEmailAddress Set objAppt = Application.CreateItem(olAppointmentItem) If InStr(1, LCase(Item.Subject), "new appointment") Then ' new appointment, appointment subject, location, start date & time 4 PM, duration in minutes Private Sub olInbox_ItemAdd(ByVal Item As Object) Set NS = Application.GetNamespace("MAPI") To send the appointment as a meeting uncomment the meeting status, required attendee, and send lines.

Set olInbox = NS.GetDefaultFolder(olFolderInbox).Items

If you want to " watch a different folder", change this line: New appointment, this is a test,3/20/16 4 P, 30 To leave the location field blank, use two commas:

I tested it with these two date and time formats: Keyword, appointment subject, location, date & time, duration in minutesĪny valid date format should work.
