Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Outlook tasks/reminder
Message
De
08/08/2006 10:06:17
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
01143626
Message ID:
01143775
Vues:
11
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform