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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to add a Task/Reminder to MS Outlook 2

Status
Not open for further replies.

ikh

Programmer
Apr 17, 2001
24
0
0
CA
Does anybody has an idea how to add a Task/Reminder to MS Outlook?
I found following code for MS Access but couldn't make it work in VFP. Any help greatly appreciated.

Dim appOutLook As Outlook.Application
Dim taskOutLook As Outlook.TaskItem
Set appOutLook = CreateObject("Outlook.Application")
Set taskOutLook = appOutLook.CreateItem(olTaskItem)
With taskOutLook
.Subject = "This is the subject of my task"
.Body = "This is the body of my task."
.ReminderSet = True
* Set to remind us 2 minutes from now.
.ReminderTime = DateAdd("n", 2, Now)
* Set the due date to 5 minutes from now.
.DueDate = DateAdd("n", 5, Now)
.Save
End With
 
You could try something like this:

Code:
oOut = CREATEOBJECT("outlook.application")
oAppointment = ;
  oOut.CreateItem(1)  && 1 = appointment item
oAppItem.start = <datetime of start time>
oAppItem.end = <date time of end time>
oAppItem.subject = "Our meeting"
oAppItem.body = ;
  "Details of the meeting"
oAppItem.Location = "My place"
oAppItem.save

Not tested, but it should give you a rough idea.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Thank you. It worked.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top