Dim olApp As Outlook.Application
Dim olNewContact As Outlook.ContactItem
Set olApp = CreateObject("Outlook.Application")
Set olNewContact = olApp.CreateItem(olContactItem)
With olNewContact
... set data fields ...
.Save
End With
Does anyone know how can I use VBA to UPDATE a contact item once it's been created? Thanks.
--
Michael Ryle
North Eastham, MA
... set data fields ...
MyContact.Save
The potentially hard part is getting MyContact in the first place. You
didn't say *which* contact you wanted to update.
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx
"Michael Ryle" <Micha...@discussions.microsoft.com> wrote in message
news:2F337928-7CD2-4239...@microsoft.com...
You're right, I didn't say, because I don't know what identifies a contact, what the "key" is, and how to get currency on the item I want to update. That is the part I don't know. If I had some clue as to where it was documented I wouldn't have to ask.
--
Michael Ryle
North Eastham, MA
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx
"Michael Ryle" <Micha...@discussions.microsoft.com> wrote in message
news:AB6DB873-81AA-448F...@microsoft.com...
> Sue,
>
> You're right, I didn't say, because I don't know what identifies a
contact, what the "key" is, and how to get currency on the item I want to
update. That is the part I don't know. If I had some clue as to where it
was documented I wouldn't have to ask.
>
> --
> Michael Ryle
> North Eastham, MA
>
>
> "Sue Mosher [MVP-Outlook]" wrote:
>
> > You'd use
> >
> > ... set data fields ...
> > MyContact.Save
> >
> > The potentially hard part is getting MyContact in the first place. You
> > didn't say *which* contact you wanted to update.
> >
When the Access form is closed, VBA code copies (i.e. propagates) this information into Outlook by creating a new contact item as described below.
On Wednesday, the client tells me he has a new email address and I change it in Access. How do I update the corresponding contact item?
This presumes there are no duplicates in the Outlook contacts folder (or there aren't supposed to be).
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx
"Michael Ryle" <Micha...@discussions.microsoft.com> wrote in message
news:AA0E3C48-36D3-4C55...@microsoft.com...
I'll give it a try when I get a chance.
--
Michael Ryle
North Eastham, MA