Add date to Outlook event title

I’ve made a script to add the date of an event to the hook title in Outlook.

Currently the AppleScript for accessing a recurring event’s date is broken. Anyone know a way of getting the date?

Get address


	if class of myObj is calendar event then
		if myObj's is recurring then
			set theDate to start time of myObj
			-- set theDate to start date of recurrence of myObj
			-- the above line should work according to the documentation but accessing repeating event recurrences seems to be broken at the moment
			set theDate to start time of myObj
		end if
		set theYearString to year of theDate as text
		set theMonthString to (month of theDate as integer) as string
		if (the length of theMonthString is 1) then set theMonthString to "0" & theMonthString
		set theDayString to day of theDate as text
		if (the length of theDayString is 1) then set theDayString to "0" & theDayString
		set theDateString to theYearString & "-" & theMonthString & "-" & theDayString
		set theTitle to (subject of myObj) & " — " & theDateString
		set objName to theTitle
		set myClass to "calendar"