Help with TaskList control from Access

J

Joe Cilinceon

What I'm trying to do is setup Outlook's Task list and send tasks from an
Access Database. I'm working with Office XP Developers version. What I have
so far is show below: I'm trying to come up with a way to pass the Subject,
body, reminderTime and date to it on a daily shut down using a query, if
this is possible.

Public Function fncAddOutlookTask()
Dim OutlookApp As Outlook.Application
Dim OutlookTask As Outlook.TaskItem

Set OutlookApp = CreateObject("Outlook.Application")
Set OutlookTask = OutlookApp.CreateItem(olTaskItem)

With OutlookTask
.Subject = "This is the subject of my task"
.Body = "This is the body of my task."
.ReminderSet = True
.ReminderTime = DateAdd("n", 2, Now) 'Remind 2 minutes from now.
.duedate = DateAdd("n", 5, Now) 'Due 5 minutes from now.
.ReminderPlaySound = False
.ReminderSoundFile = "C:\Windows\Media\Ding.wav" 'Modify path.
.Save
End With
End Function

What I would like to know is how I could send tasks based on a query to this
function and have it show in my tasks in Outlook. For example we might have
a tenant expected to vacate on a given date and want it to show on the task
list on that day, so we are sure to check the space. Any help would be
greatly appreacaited.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top