How to export mail id from outlook 2007
To export email addresses from Outlook 2007, you can follow these steps:
Method 1: Exporting Contacts
- Open Outlook 2007 and go to the "Contacts" folder.
- Select all contacts by pressing Ctrl+A or by selecting the first contact and then Shift+clicking on the last contact.
- Right-click on the selected contacts and choose "Export Contacts" from the context menu.
- In the "Export Contacts" wizard, select "Comma Separated Values (Windows)" as the export format.
- Choose a location to save the file and enter a file name.
- Click "Export" to export the contacts.
The exported file will contain the email addresses in the format:
"First Name" <email address>
Method 2: Exporting Email Addresses from the Global Address List (GAL)
- Open Outlook 2007 and go to the "Address Book" (or "Contacts" if you have the "Contacts" folder set as the default address book).
- Click on the "Global Address List" (GAL) button in the "Address Book" window.
- Select all contacts by pressing Ctrl+A or by selecting the first contact and then Shift+clicking on the last contact.
- Right-click on the selected contacts and choose "Export Contacts" from the context menu.
- In the "Export Contacts" wizard, select "Comma Separated Values (Windows)" as the export format.
- Choose a location to save the file and enter a file name.
- Click "Export" to export the contacts.
The exported file will contain the email addresses in the format:
"First Name" <email address>
Method 3: Using VBA Macro
-
Open Outlook 2007 and go to the "Developer" tab (if you don't see the "Developer" tab, go to "Tools" > "Trust Center" > "Macro Settings" and enable the "Developer" tab).
-
Click on the "Visual Basic" button in the "Developer" tab.
-
In the Visual Basic Editor, click on "Insert" > "Module" to insert a new module.
-
Paste the following code into the module:
Sub ExportEmailAddresses() Dim olApp As New Outlook.Application Dim olNamespace As Outlook.Namespace Dim olAddressList As Outlook.AddressList Dim olContact As Outlook.ContactItem Dim strFile As String Dim strLine As String strFile = "C:\EmailAddresses.csv" ' change this to your desired file location and name Set olNamespace = olApp.GetNamespace("MAPI") Set olAddressList = olNamespace.GetAddressList("Global Address List") Open strFile For Output As #1 For Each olContact In olAddressList.GetContacts() strLine = olContact.FullName & " <" & olContact.Email1Address & ">" Write #1, strLine Next olContact Close #1 Set olContact = Nothing Set olAddressList = Nothing Set olNamespace = Nothing Set olApp = Nothing End Sub
-
Click "Run" to run the macro.
-
The macro will export the email addresses to a CSV file named "EmailAddresses.csv" in the specified location.
Note: Make sure to adjust the file path and name in the code to match your desired location and file name.