Dan Task Item Object Not Created

  • Thread starter Thread starter S Jackson
  • Start date Start date
S

S Jackson

Dan:

In your post below you stated:

The TaskItem object is created by your Outlook Application variable so you
don't have to worry about that one.

Here is a portion of my code:
Dim objOutlook As Object
Dim objTask As Object

Set objOutlook = CreateObject("Outlook.Application")
Set objTask = objOutlook.CreateItem(olTaskItem)

With objTaskItem
.Subject = Me.CaseName & " / DHS No. " & Me.DHSNo
.DueDate = Me.TcklDate
.Body = Me.Event
.ReminderSet = True
.Save
End With

I am getting the following error: Error 424 Object Required

I figured out by commenting out different lines of the code one-at-a-time
that this error occurs when the With statement is executed. Does this mean
that I have to declare the TaskItem as Object? If I do that, what is the
"Set" statement?

Sorry, pretty lost here, but I'm slowly figuring this out.
TIA
S. Jackson
 
What is objTaskItem supposed to represent? Is it the Item that you created
in the previous step? Then it should be

With objTask

since that's the name of the object you created.
 
Hi,
There are way too many threads now on this topic.
I just noticed another one where Bruce helped you out.

Please, stick to one thread.
I do continue checking posts that I've replied to until I feel
that they're resolved.
 
My apologies for the numerous posts (squeaky wheel and all) as I wasn't sure
you would go back and check a thread you had already responded to.

I responded below. Thank you again for your help. I'll give it a go.
S. Jackson
 
Back
Top