Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Outlook tasks/reminder
Message
From
08/08/2006 10:06:17
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01143626
Message ID:
01143775
Views:
12
>I'm trying to add a reminder into a users outlook from VFP9, I've created an email message before and I'm trying to see if I'm heading in the right direction. There also could be an occasion when I need to delete the created task. Can I find the task and delete it. Is that even possible?
>
>oOutLookObject = CreateObject("Outlook.Application")
>	oNamespace = oOutLookObject.GetNameSpace("MAPI")
>	oTasks = oNamespace.GetDefualtFolder(13)
>	newtask = oTasks.Items.Add()
>		>	newtask.Subject = thisform.custno
>	newtask.DueDate = dtoc(thisform.date.value) + thisform.time.value
>	newtask.ReminderTime = dtoc(thisform.date.value) + thisform.time.value
Rather than addding directly to the collection, the best way to add items in Outlook is to use the CreateItem method, fill in the item and then save it:
oTask = oOutlookObject.CreateItem(3)
WITH oTask
   .Subject = thisform.custno
   .DueDate = dtoc(thisform.date.value) + thisform.time.value
   .ReminderTime = dtoc(thisform.date.value) + thisform.time.value
   .Save()

   nItemID = .EntryID
ENDWITH
Tamar
Previous
Reply
Map
View

Click here to load this message in the networking platform