How do I create a macro to add contacts from email messages?

P

PayPaul

I'm trying to add all the senders to my current email address to my contacts.
I want to create a macro to do this but I'm a serious newbie to Visual Basic.
How can I do this? What's the code?
 
M

Michael Bauer [MVP - Outlook]

If you want to do that when receiving an email, see the ItemAdd event of the
Inbox (there's an example in the VBA help file). And for sent item see the
ItemSend event of the Application object.

In that events you can either read the SenderEmailAddress property, or all
the addresses from the Recipients collection.

For creating a contact see the CreateItem function. You could call the
function for each address, and add the address to the contact item's
Email1Address property.

--
Best regards
Michael Bauer - MVP Outlook
Manage and share your categories:
<http://www.vboffice.net/product.html?pub=6&lang=en>


Am Sun, 3 Jan 2010 08:41:01 -0800 schrieb PayPaul:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top