How to export mails from outlook 2010

There are a few ways to export emails from Outlook 2010:

Method 1: Exporting emails using the "Export to a File" feature

  1. Open Outlook 2010 and go to the "File" menu.
  2. Click on "Open & Export" and then select "Export to a File".
  3. Choose the type of file you want to export to (e.g. PST, EML, MSG, CSV).
  4. Select the folder or mailbox you want to export from.
  5. Choose the export options (e.g. include attachments, include subfolders).
  6. Click "Next" and then "Finish" to start the export process.

Method 2: Exporting emails using the "Import and Export" wizard

  1. Open Outlook 2010 and go to the "File" menu.
  2. Click on "Open & Export" and then select "Import/Export".
  3. Choose "Export to a file" and then click "Next".
  4. Select the type of file you want to export to (e.g. PST, EML, MSG, CSV).
  5. Select the folder or mailbox you want to export from.
  6. Choose the export options (e.g. include attachments, include subfolders).
  7. Click "Finish" to start the export process.

Method 3: Exporting emails using a third-party add-in

There are many third-party add-ins available that can help you export emails from Outlook 2010. Some popular options include:

Method 4: Exporting emails using VBA scripting

If you're comfortable with VBA scripting, you can use the Outlook Object Model to export emails programmatically. This method requires some programming knowledge and is more advanced than the other methods.

To export emails using VBA scripting, you'll need to:

  1. Open the Visual Basic Editor in Outlook by pressing Alt+F11 or by navigating to the "Developer" tab in the ribbon.
  2. Create a new module by clicking "Insert" > "Module" in the Visual Basic Editor.
  3. Write a VBA script that uses the Outlook Object Model to export the emails you want to export.
  4. Run the script to export the emails.

Here's an example VBA script that exports emails from a specific folder:

Sub ExportEmails()
    Dim olApp As New Outlook.Application
    Dim olNamespace As Outlook.Namespace
    Dim olFolder As MAPIFolder
    Dim olItems As Items
    Dim i As Integer

    Set olNamespace = olApp.GetNamespace("MAPI")
    Set olFolder = olNamespace.GetDefaultFolder(olFolderInbox)
    Set olItems = olFolder.Items

    For i = 1 To olItems.Count
        If olItems(i).Class = olMail Then
            Dim olMail As MailItem
            Set olMail = olItems(i)
            ' Export the email to a file
            olMail.SaveAs "C:\ExportedEmails\email" & i & ".eml"
        End If
    Next i

    Set olItems = Nothing
    Set olFolder = Nothing
    Set olNamespace = Nothing
    Set olApp = Nothing
End Sub

This script exports emails from the default inbox folder to a folder called "ExportedEmails" on the C: drive. You'll need to modify the script to export emails from the folder you want and to specify the export location.