473,473 Members | 1,548 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How do I Access all the Past Email Addresses I've used in Outlook 2007

1 New Member
How do I access all the past email addresses I've used in Outlook? I want to send an EM to everyone I've emailed in the past.
Sep 22 '11 #1
1 1802
ADezii
8,834 Recognized Expert Expert
Here is some interesting Code that I came across that will retrieve the E-Mail Addresses of all Users from all Mails in an Outlook Folder, but first:
  1. Open the Visual Basic Editor (ALT+F11).
  2. Double Click on ThisOutlookSession in the Project Window.
  3. Copy-N-Paste the following Sub-Routine.
    Expand|Select|Wrap|Line Numbers
    1. Sub GetALLEmailAddresses()
    2. Dim objFolder As MAPIFolder
    3. Dim strEmail As String
    4. Dim strEmails As String
    5. Dim objItem As Object
    6.  
    7. Set objFolder = Application.GetNamespace("Mapi").PickFolder
    8.  
    9. For Each objItem In objFolder.Items
    10.   If objItem.Class = olMail Then
    11.     strEmail = objItem.SenderEmailAddress
    12.       If InStr(strEmails, strEmail) = 0 Then strEmails = strEmails + strEmail + ";"
    13.   End If
    14. Next
    15.  
    16. Debug.Print strEmails
    17. End Sub
    18.  
  4. Hit the F5 Key and let it Run.
  5. Select an Outlook Folder when prompted.
  6. Press CTRL+G (Immediate Window).
  7. Copy-N-Paste the String that was produced in order to obtain the E-Mail Address off all Users from all Mails in the Outlook Folder.
Sep 23 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Hoang | last post by:
anyone know of an algorithm to filter out real email addresses as opposed to computer generated email addresses? I have been going through past email archives in order to find friends email...
2
by: Saintor | last post by:
I have a string of email addresses with duplicates. like "abc@abc.com; cde@cde.com; abc@abc.com" If I use this string with sendobject, the receiver will get it only once which is perfect to...
4
by: Brian Hampson | last post by:
I recently upgraded to Outlook 2007 B2TR and have found that I can no longer code against MAPI.DLL It's gone :( Using C#, I used to get the MAPI session, and from that I could change the out of...
1
by: tomer.ha | last post by:
Hi there, I'd like to send emails from a Python program using Simple MAPI. I've tried this code: http://mail.python.org/pipermail/python-list/2004-December/298066.html and it works well with...
1
by: Sergeles | last post by:
I am currently in the process of making/maintaining a database for a school club. I started the database mostly from scratch and i have a pretty good familiarity with Access (been using it for almost...
4
by: venutaurus539 | last post by:
Hi all, Can some one help me in obtaining the set of recipients email addresses from an outlook mail? I tried various options like message.Recipient.Address message.To.Address...
1
by: =?Utf-8?B?ZHRvd24gT3V0bG9vayAyMDA3IGNyYXNo?= | last post by:
Outlook 2007 keeps freezing on startup. I am running Vista Home Premium. I need to get back to work- please HELP! Outlook will appear to start but it locks into "Updating cached messages......
21
by: farisallil | last post by:
Hi I have a table called Info with a column called Email Address in it. I want to create a command button in a form called Customer ,which has the Info table as the Record Source, and I want this...
4
by: infomage27 | last post by:
I have tried scripting this with rules and VBA, now trying with C# but still failing. (code is exploratory, so please excuse the terribleness) maybe someone here will show me the error of my...
7
by: Raven7738 | last post by:
Hey, I'm currently using Access 2007. I've created a form that shows a list of search results in a subform. I want the user to be able to select specific people from the list and press a button...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.