Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Exporting from Exchange Server

Posted on 2001-07-10
Medium Priority
Last Modified: 2012-05-04
When exporting all mailboxes out of exchange to a CSV file, does anyone know if there is a way to do this with only the SMTP email addresses coming across and not the ccmail, X400 etc... I am trying to import the list and the program can not see the email addresses because it is seeing all of the different email standards.
Question by:dbennett
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 56

Expert Comment

ID: 6272554
Assuming you mean exporting the directory. Export to a .CSV, edit this with notepad and remove all the data just keeping the first line which is the column titles. Remove the titles you don't want and export again to this same file. It's the same process as in except that in this case you want to remove some the headers rather than add one.

There's a program called header.exe in resource kit which will create the initial export file for you with your chosen columns but not needed.

Accepted Solution

NickBentley earned 200 total points
ID: 6298523
I have been doing this as a temporary measure until our two organisations are merged.  I haven't found a way yet (haven't exactly spent a 'lot' of time on this!) to get only the SMTP addresses.
The email addresses come out as one big field.  I open the csv file in Excel and I wrote a quick & dirty macro to 'parse' the email field & only extract the SMTP address.
The macro is below from Excel 2000 (should work the same in 97).  The columns may not match up as I customised the header file to export some fields we were using that weren't included in the standard header.
At the end I have to select the current region (Ctrl+*) & format as text as the macro refuses to do this (otherwise you get errors when you import).

Sub main()
'  main 'controlling' module.
'  This just calls all the other modular (!) macro components.
'  Nick Bentley 15/1/01


End Sub

Sub ChgClassToRemote()
' ChgClassToRemote Macro
' Component to select the first column (presume that we are using the custom export csv)
' It will then change all entries to Remote so that they can be imported as custom recipients
'  Nick Bentley 15/1/01
    Range(Selection, Selection.End(xlDown)).Select
    Selection.FormulaR1C1 = "Remote"
End Sub

Sub BlankColumns()
' Select column (I) and blank it out - this is not needed or desirable
' as the SMTP addresses have been (hopefully) parsed out of this list and
' the X400 etc addresses are not required (or valid!) for importing into a
' 'Foreign' exchange organisation
'  Nick Bentley 15/1/01
    Selection.Delete Shift:=xlToLeft
End Sub
Sub SplitAddresses()
' SplitAddresses Macro
' This first selects the column containing the concatenated addresses as exported by echange.
' It should be in column I.  Next the column is split into further columns using a percent
' character as the delimiter and simultaneously moved to range aa2 (which should be blank)
' This new range is then selected and each cell tested in turn to find where the SMTP addresses
' are.  Each smtp address is then moved to column H.
' At the end the range is cleared ready for saving.
'  Nick Bentley 15/1/01
    Dim testcell, NRow, NCol, Ntrue
    Ntrue = 0
    Range(Selection, Selection.End(xlDown)).Select
    Selection.TextToColumns Destination:=Range("AA2"), DataType:=xlDelimited, _
        TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
        Semicolon:=False, Comma:=False, Space:=False, Other:=True, OtherChar _
        :="%", FieldInfo:=Array(Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1))
    For Each testcell In Selection
        NRow = testcell.Row
        NCopyTo = "H" & NRow
        If Left(testcell, 4) = "SMTP" Then
        End If
End Sub

' This module Selects the current working area and then selects the blank cells
' within it (SpecialCells...) this is the equivalent of the goto special command.
' Each cell is then formatted as Text (@) so that no blank fields are lost when the
' save_as happens - doesn't seem to be 100% effective at this, so a manual select &
' format may be required.
'  Nick Bentley 15/1/01

Sub changetotext()
    With Selection
        .NumberFormat = "@"
    End With
End Sub
LVL 44

Expert Comment

ID: 7270430
Hello dbennett@devx

this question is open for more then 2 months
time to clean up
if not stated otherwise

my recom will be
-points to NickBentley
-this will be finalized by an EE Moderator
-with no further update (15.09.2002)


posted by ToolzEE v1.0

Expert Comment

ID: 7297070
Question has been closed as per recommendation

JGould-EE Moderator

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will help to fix the below errors for MS Exchange Server 2013 I. Certificate error "name on the security certificate is invalid or does not match the name of the site" II. Out of Office not working III. Make Internal URLs and Externa…
A couple of months ago we ran into an issue that necessitated re-creating our Edge Subscriptions. However, when we attempted to execute the command: New-EdgeSubscription -filename C:\NewEdgeSub_01.xml we received an error indicating that the LDAP se…
To show how to create a transport rule in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Rules tab.:  To cr…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question