Hi.
I have code that used to work on previous versions of Office but doesn't seem to now and I can't work out why.
I have a spreadsheet with various columns, one of which is dates, formatted as dates (Long Date specifically), then a macro that reads each line and creates a recurring outlook appointment for each one. However, the result is all the details are correct on the Outlook appointment, except it's creating them all today (whichever day you run it). The portion of code that is not quite working is below. It's the Start and End parameters that are just being ignored or overridden.
Is anyone able to shed any light please?
With olAppt
Set oPat = .GetRecurrencePattern
oPat.RecurrenceType = olRecursYearly
.Start = DateValue(Cells(i, 3)) + TimeValue("9:00:00")
.End = DateValue(Cells(i, 3)) + TimeValue("9:01:00")
.Subject = Cells(i, 1) + " " + Cells(i, 2) + " is on " & Cells(i, 3) & " since " & Cells(i, 4)
'.Location = Cells(i, 2)
.Body = .Subject
.BusyStatus = olFree
.ReminderMinutesBeforeStart = 10080
.ReminderSet = True
'.Categories = Cells(i, 4)
'.IsRecurring
.Save
End With
Bookmarks