Hi,
I've been trying to get a code together for sending a task from an excel sheet to someone via outlook but can't work it out. I've found a couple of codes on here but keep getting errors.
Can anyone help me out?
I've been trying to get a code together for sending a task from an excel sheet to someone via outlook but can't work it out. I've found a couple of codes on here but keep getting errors.
Can anyone help me out?
Code:
Sub tasksend()
Dim objOut As Object
Dim objTask As Object
Dim strbody As String
Set objOut = CreateObject("Outlook.Application")
Set objTask = OutApp.CreateItem(olTaskItem)
strbody = "blah"
With objTask
.Assign
.Subject = Range("E65536").End(xlUp).Offset(0, 0).Value
.Body = strbody
.DueDate = Range("H65536").End(xlUp).Offset(0, 0).Value
.Recipients.Add (Range("M65536").End(xlUp).Offset(0, 0).Value)
'.Send
.Display
End With
Set objTask = Nothing
Set objOut = Nothing
End Sub