DonkeyOte,
Per the code below;
Sub Example()
Dim OLApp As Outlook.Application
Dim OLTk As Outlook.TaskItem
Set OLApp = New Outlook.Application
Set OLTk = OLApp.CreateItem(olTaskItem)
With OLTk
.Subject = Cells(1, "A")
.StartDate = Cells(2, "A")
.DueDate = Cells(2, "A") + 1
.ReminderTime = .StartDate - 1
.Body = "This is a Task"
.Save
End With
Set OLTk = Nothing
Set OLApp = Nothing
End Sub
It always stops at the -Dim OLApp As Outlook.Application. It works in the workbook that I first pasted it in but when I try to paste it into another workbook it errors out at that line.
Sure could use the help to get this solved.
Thanks
Bookmarks