A Way to Save Contact Cards in MS Exchange Outlook to Excel or TabDel in order to import into Filemaker?

rvfowler2 used Ask the Experts™
Is there a way to Save Contact Cards in MS Exchange Outlook to Excel or TabDel in order to import into Filemaker?  Did an Internet search, but all the methods I try don't work.  When I open the contact card that appears in the attachment, there isn't the File Menu or right click selections the directions say there are.   Even tried to import into Outlook to export back out, but still can find the menu items to support that.  Thank you.
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Professor JMicrosoft Excel Expert
Top Expert 2014

From outlook xport your contacts as comma -separated text (.csv)  tab-delimited text (.txt) or as vCards (.vcf).   If you select vCards, then, in the search engine of your choice, search for  “vCard to CSV” and rhen choose any of preferred converters.  You can then import the CSV file into FileMaker Pro by choosing File > Import Records > File.


That part I know, but how do you get a card that is sent as an attachment exported or alternatively imported into Outlook and then exported to a .csv, etc.?
Top Expert 2016

Which version of outlook? Things change over time
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!


MS office 2013 using MS Exchange Server 2010.  See attached contact card (redacted).
Microsoft Excel Expert
Top Expert 2014
i am still not sure, i understood the question, from what i understood that you have your business cards vcf contacts received as attachments in your outlook. if that is the case well, it is not an easy thing, but here is my try.

first you need to use the below code that saves all vcf attachments from your outlook folder

please read the code commentaries. this code original source is Ron's Excel site.

Sub Test()
'Arg 1 = Folder name of folder inside your Inbox if you do not have one First right click on the Inbox and choose New Folder
'Arg 2 = File extension, "" is every file
'Arg 3 = Save folder, "C:\Users\Ron\test" or ""
'        If you use "" it will create a date/time stamped folder for you in your "Documents" folder
'        Note: If you use this "C:\Users\Ron\test" the folder must exist.

' on the Arg one lets say you created a folder called Contacts under inbox and you have moved all of your emails there
' then put that folder name in the code like shown below

    SaveEmailAttachmentsToFolder "Contacts", "vcf", "C:\Users\Username\VCFAttachments\"
End Sub

Sub SaveEmailAttachmentsToFolder(OutlookFolderInInbox As String, _
                                 ExtString As String, DestFolder As String)
    Dim ns As NameSpace
    Dim Inbox As MAPIFolder
    Dim SubFolder As MAPIFolder
    Dim Item As Object
    Dim Atmt As Attachment
    Dim FileName As String
    Dim MyDocPath As String
    Dim I As Integer
    Dim wsh As Object
    Dim fs As Object

    On Error GoTo ThisMacro_err

    Set ns = GetNamespace("MAPI")
    Set Inbox = ns.GetDefaultFolder(olFolderInbox)
    Set SubFolder = Inbox.Folders(OutlookFolderInInbox)

    I = 0
    ' Check subfolder for messages and exit of none found
    If SubFolder.Items.Count = 0 Then
        MsgBox "There are no messages in this folder : " & OutlookFolderInInbox, _
               vbInformation, "Nothing Found"
        Set SubFolder = Nothing
        Set Inbox = Nothing
        Set ns = Nothing
        Exit Sub
    End If

    'Create DestFolder if DestFolder = ""
    If DestFolder = "" Then
        Set wsh = CreateObject("WScript.Shell")
        Set fs = CreateObject("Scripting.FileSystemObject")
        MyDocPath = wsh.SpecialFolders.Item("mydocuments")
        DestFolder = MyDocPath & "\" & Format(Now, "dd-mmm-yyyy hh-mm-ss")
        If Not fs.FolderExists(DestFolder) Then
            fs.CreateFolder DestFolder
        End If
    End If

    If Right(DestFolder, 1) <> "\" Then
        DestFolder = DestFolder & "\"
    End If

    ' Check each message for attachments and extensions
    For Each Item In SubFolder.Items
        For Each Atmt In Item.Attachments
            If LCase(Right(Atmt.FileName, Len(ExtString))) = LCase(ExtString) Then
                FileName = DestFolder & Item.SenderName & " " & Atmt.FileName
                Atmt.SaveAsFile FileName
                I = I + 1
            End If
        Next Atmt
    Next Item

    ' Show this message when Finished
    If I > 0 Then
        MsgBox "You can find the files here : " _
             & DestFolder, vbInformation, "Finished!"
        MsgBox "No attached files in your mail.", vbInformation, "Finished!"
    End If

    ' Clear memory
    Set SubFolder = Nothing
    Set Inbox = Nothing
    Set ns = Nothing
    Set fs = Nothing
    Set wsh = Nothing
    Exit Sub

    ' Error information
    MsgBox "An unexpected error has occurred." _
         & vbCrLf & "Please note and report the following information." _
         & vbCrLf & "Macro Name: SaveEmailAttachmentsToFolder" _
         & vbCrLf & "Error Number: " & Err.Number _
         & vbCrLf & "Error Description: " & Err.Description _
         , vbCritical, "Error!"
    Resume ThisMacro_exit

End Sub

Open in new window

once you have all of your attachments vcf files into a folder, then the below code needs to run and it will prompt askign you to select the folder and then vcf files and once you selected them and clicked ok then it will import all of the informations of vcf files into Excel.

Option Explicit
'original source mrexcel forum
Const MainSheet As String = "Sheet1"
Dim iRowPointer As Long
Dim iFileCount As Long
Public Sub Import_VCF_Files()
  Dim iPtr As Long
  Dim sFileArray As Variant
  Dim sFileName As Variant
  Dim dtStart As Date
  iPtr = InStrRev(ActiveWorkbook.FullName, ".")
  If iPtr = 0 Then
    sFileName = ActiveWorkbook.FullName & ".vcf"
    sFileName = Left(ActiveWorkbook.FullName, iPtr - 1) & ".vcf"
  End If
  sFileArray = Application.GetOpenFilename(FileFilter:="VCF files (*.vcf), *.vcf", MultiSelect:=True)
  If Not IsArray(sFileArray) Then Exit Sub
  dtStart = Now()
  iFileCount = 0
  iRowPointer = 0
  Application.ScreenUpdating = False
  For Each sFileName In sFileArray
    Call Import_VCard(sFileName)
    iFileCount = iFileCount + 1
  Next sFileName
  Application.ScreenUpdating = True
  MsgBox "Finished: " & CStr(iFileCount) & " file" & IIf(iFileCount = 1, "", "s") & " imported" _
       & Space(10) & vbCrLf & vbCrLf _
       & "Run time: " & Format(Now() - dtStart, "hh:nn:ss") & Space(10), _
       vbOKOnly + vbInformation
End Sub
Private Sub Import_VCard(ByVal argFilename As String)
  Dim intFH As Integer
  Dim sRecord As String
  intFH = FreeFile()
  Open argFilename For Input As intFH
  iRowPointer = iRowPointer + 1
  Sheets(MainSheet).Cells(iRowPointer, 1) = argFilename
  Do Until EOF(intFH)
    Line Input #intFH, sRecord
    iRowPointer = iRowPointer + 1
    Sheets(MainSheet).Cells(iRowPointer, 1) = sRecord
  Close intFH
End Sub

Open in new window

i tried this by myself and it worked.


Great, thanks so much.
Professor JMicrosoft Excel Expert
Top Expert 2014

you are welcome

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial