A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

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



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 3rd 10, 04:41 PM posted to microsoft.public.outlook.program_vba
PayPaul
external usenet poster
 
Posts: 1
Default How do I create a macro to add contacts from email messages?

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?
Ads
  #2  
Old January 3rd 10, 05:29 PM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default How do I create a macro to add contacts from email messages?



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:

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?

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Create macro to insert signature into email... Fuel451 Outlook and VBA 8 December 31st 09 02:26 PM
Macro to create new email message with different account as sender Brian Beck Outlook and VBA 1 March 21st 07 11:15 PM
How do I create a macro to email a file Roger Outlook and VBA 1 October 24th 06 06:20 PM
Would like to create VCards from Contacts, using a Macro? LA Outlook - Using Contacts 1 May 24th 06 04:50 PM
How do I create multiple VCards from Contacts, using a Macro? LA Outlook and VBA 0 May 22nd 06 07:35 PM


All times are GMT +1. The time now is 11:35 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.