Dim OApp As Object
Dim OAppt As Object
Dim myRecurPattern As Object
Set OApp = CreateObject("Outlook.Application")
Set OAppt = OApp.CreateItem(1)
Set myRecurPattern = OAppt.GetRecurrencePattern
With myRecurPattern
.RecurrenceType = 6 'olRecursYearNth
.PatternStartDate = dtStart
.Interval = 1 '<<<------error here
.PatternEndDate = dtStart
End With
With OAppt
.To = ""
.Start = dtStart
.Duration = ""
.Body = "Test"
.save
End with
Set OApp = Nothing
Set OAppt = Nothing
Set myRecurPattern = Nothing
I need to add Birthday with Recurrence every year.
Everything is good except 'Interval = 1" part.
It says, "Runtime error 440, Recurrence Pattern is valid "
I am using 'Late Binding' to avoid version problem.
How can I solve this problem?
Thanks.
Bookmarks