*///////////////////////////////////////////////// oOutLookObject = CreateObject("Outlook.Application") olNameSpace = oOutlookObject.GetNameSpace("MAPI") oTasks = olNameSpace.GetDefaultFolder(olFolderTask).Items For nItem = 1 to oTasks.Count This.List1.AddListItem(ttoc(oTasks.Item(nItem).StartDate), nitem, 1) This.List1.AddListItem(oTasks.Item(nItem).Subject, nitem, 2) Next nItem release oTasks, olNameSpace, oOutLookObject */////////////////////////////////////////////////However, the following will add a task item in Outlook 98:
*///////////////////////////////////////////////// *// Folder Constants #DEFINE olFolderCalendar 9 #DEFINE olFolderContacts 10 #DEFINE olFolderDeletedItems 3 #DEFINE olFolderInBox 6 #DEFINE olFolderJournal 11 #DEFINE olFolderNotes 12 #DEFINE olFolderOutBox 4 #DEFINE olFolderSentMail 5 #DEFINE olFolderTask 13 #DEFINE olBusy 2 #DEFINE True .T. #DEFINE False .F. #DEFINE olPrivate 2 */ Importance Constants #DEFINE olImportanceLow 0 #DEFINE olImportanceNormal 1 #DEFINE olImportanceHigh 2 *// Item Constants #DEFINE olMailItem 0 #DEFINE olAppointmentItem 1 #DEFINE olContactItem 2 #DEFINE olTaskItem 3 #DEFINE olJournalItem 4 #DEFINE olNoteItem 5 #DEFINE olPostItem 6 *// Other Constants #DEFINE olDiscard 1 #DEFINE olPromptForSave 2 #DEFINE olSave 0 *// Create the Outlook Object oOutLookObject = CreateObject("Outlook.Application") oTaskItem = oOutLookObject.CreateItem(olTaskItem) WITH oTaskItem .Subject = "My Subject" .Body = "My Body" .StartDate = date() .DueDate = date() + 10 .ReminderSet = True .ReminderTime = datetime() + 3600 .Categories = "Personal" .close(olSave) EndWith release oTaskItem, oOutLookObject */////////////////////////////////////////////////Do you know if this has changed for Outlook 2000 ? I don't see where I would use olNameSpace when adding a task.