Andy Lacey
andy at minstersystems.co.uk
Thu Jan 27 01:50:28 CST 2005
Michael
One way to get at an existing contact is, I believe, via its FileAs value.
If you know that then something like this works:
Dim objOutlookItem As Outlook.ContactItem
Dim objOutlookFolder As Object
Dim objOutlook As Outlook.Application
Dim objOutlookNameSpace As Outlook.NameSpace
'Create the Outlook session
Set objOutlook = CreateObject("Outlook.Application")
Set objOutlookNameSpace = objOutlook.GetNamespace("MAPI")
Set objOutlookFolder =
objOutlookNameSpace.GetDefaultFolder(olFolderContacts)
Set objOutlookItem = objOutlookFolder.Items(strContainingYourFileAsValue)
objOutlookItem.Delete
Then obviously set everything to Nothing
But I get to these solutions by trial and error so I can't answer many
questions, such as what if the line:
Set objOutlookItem = objOutlookFolder.Items(strContainingYourFileAsValue)
doesn't find an entry. Errors I guess.
HTH
-- Andy Lacey
http://www.minstersystems.co.uk
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
> Michael Collins
> Sent: 26 January 2005 23:30
> To: accessd at databaseadvisors.com
> Subject: [AccessD] updating outlook contacts.
>
>
> I am using access 2000 and need to be able to update the
> contacts in outlook. I am able to add to the contacts but I
> can't seem to find and way to update an existing contact. It
> would be nice also to be able to delete an entry.
>
> Thanks for the help in advance.
>
>
> Michael
>