Add Follow Up/To-Do through the COM inteface

I am having problems figuring out how to add an item in either the To Do list or making a Follow Up memo (equivalent to a Task in Outlook) programmatically.My attemps have led to the following code, which creates a memo in the Draft folder of the Mail module.

Does anyone have an idea on how to get further (and hopefully some sample to illustrate).

Thanks, Ramzi

Set session = CreateObject("Notes.Notessession")

Set db = session.getdatabase("", "")

db.openmail

Set doc = db.Createdocument("($To Do)")

doc.body = "To Do"

doc.AppointmentType = "0"

doc.subject = "test add task"

Call doc.Save(True, True)



Set session = Nothing

Set db = Nothing

Set doc = Nothing

Subject: BTW… Follow-up is different than a To Do, Notes has To Do’s as well.

Subject: RE: BTW… Follow-up is different than a To Do, Notes has To Do’s as well.

Yes I can see that. But how do created either one of them?

Ramzi