Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Appointment contacts
Message
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 XP
Database:
Visual FoxPro
Divers
Thread ID:
01189052
Message ID:
01189119
Vues:
17
>Hi
>
>How do I access/set the contacts field from an appointment object? Contacts and diary events are currently be synchronised but I have been trying to set the companies property to link to contact to the diary event. I have a feeling there is more to this possible the links? Any help is very much appreciated.

Paul,

untested but something like this...
#DEFINE olFolderCalendar 9
#DEFINE olFolderContacts 10

oOutlook = CREATEOBJECT('outlook.application')
oNameSpace = oOutlook.getnamespace('MAPI')
oDefaultContactFolder=oNameSpace.GetDefaultFolder(olFolderContacts)
oDiaryFolder=oNameSpace.GetDefaultFolder(olFolderCalendar)

oItems = oDiaryFolder.items
FOR EACH oItem IN oItems
	FOR EACH oLink IN oItem.links
		oLinkItem = oLink.ITEM && this is the contact item
	NEXT
NEXT

&& to add a contact
oLinkItem = oDefaultContactFolder.items.FIND('[Lastname]='+"Bloggs")
oItem.links.ADD(oLinkItem)
hth

Nigel
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform