Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access VBA - Create Task Request in Outlook 2003

Status
Not open for further replies.

Blorf

Programmer
Joined
Dec 30, 2003
Messages
1,608
Location
US
Hi.

This should be realy simple, but I am strugling.

I want to send task requests to various folks, and I thought it would be as simple as

Set ObjOutlook = CreateObject("Outlook.Application")
Set objemail = ObjOutlook.CreateItem(olTaskItem)

But the methods of the OlTaskItem elude me.

Example, the .To or the .DueDate don't seem to be happy.

Any advise would be very much appreciated.

Thanks,
ChaZ

There Are 10 Types Of People In The world:
Those That Understand BINARY And Those That Don’t.
 
Chaz

View the thread below for some of the methods/properties you are looking for. As you can see I can assign a task to various people if Outlook is open using this code - my problem occurs when Outlook is closed.

thread705-1153560

Mark...
 
With Tasks there is no 'To', you actually [tt]Assign()[/tt] the task then delegate it to another user, then [tt]Send()[/tt] the item. Here is the example from the (not too much) help file:
Code:
Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.CreateItem(olTaskItem)
[b]myItem.Assign
Set myDelegate = myItem.Recipients.Add("April LaMonte")[/b]
myItem.Subject = "Prepare Agenda For Meeting"
myItem.DueDate = [i]#9/20/97#[/i]
[b]myItem.Send[/b]
I'm not sure why you are having problems with the DueDate, did you coherse the value?

CMP


Instant programmer, just add coffee.
 
Thank you both.

I will play with the code you have given and see what happens.

Regarding Due Date, is there not a Start Date method?

Thanks,
ChaZ

There Are 10 Types Of People In The world:
Those That Understand BINARY And Those That Don’t.
 
Bizzare. The code did not work, then I thought about it.

I needed to set a referecne to the outlook object library.

This made it happy.

Thanks again,
ChaZ

There Are 10 Types Of People In The world:
Those That Understand BINARY And Those That Don’t.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top