Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to find Outlook appointment and update/delete it
Message
De
18/06/2002 13:22:46
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00669711
Message ID:
00669826
Vues:
19
>How do u find an EXISTING outlook APPOINTMENT item and update/delete it? With outlook CONTACTS, there are several fields that can be populated with a PK value. You can then search for this PK value and update the contact if found or add new if not found. Cant find any appointment fields that can be used in similar manner. Cant search on the appointment's start/end and subject fields cuz they could have changed in the VFP table.

Every item in Outlook has a unique id stored in the EntryID property. You can use it to find the item you're looking for.

Use the GetItemFromId method to find the item with a given EntryID.

As for deleting an item, get a reference to the item, then call its delete method.
oOutlook=CreateObject("Outlook.Application")
oNS = oOutlook.GetNameSpace("MAPI")
oCalendar = oNS.GetDefaultFolder(9)
oItems = oCalendar.Items
oMyItem = oItems.GetItemFromId( cEntryID )
* To change the item, set properties here, then:
oMyItem.Save()

* To delete the item:
oMyItem.Delete()
Tamar
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform