How to Batch Export the Business Card Images of Multiple Outlook Contacts to a Windows Folder

Outlook doesn’t offer a direct feature supporting you to export a contact’s business card image, not to mention batch exporting multiple business card images. But, in this article, we will uncover a piece of VBA code, which can realize it with ease.

It is easy to export the contacts from your Outlook to a local folder as text files or vCard files. Yet, at times, you may want to save the contacts’ business card images to the local folder. However, there is not such a native feature for this. Hence, if you want to batch export the business card images of many contacts, you have to seek other means, such as the following one, using VBA code.

Batch Export the Business Card Images of Multiple Contacts

  1. For a start, launch Outlook VBA editor according to “How to Run VBA Code in Your Outlook“.
  2. Then, put the following code into an unused module.
Sub ExportContactBusinessCardImages()
    Dim objSelection As Outlook.Selection
    Dim objShell As Object
    Dim objWindowsFolder As Object
    Dim strWindowsFolder As String
    Dim objItem As Object
    Dim objContact As Outlook.ContactItem
    Dim strBusinessCard As String
 
    'Get the selected contacts
    Set objSelection = Application.ActiveExplorer.Selection
 
    If Not (objSelection Is Nothing) Then

       'Select a Windows folder
       Set objShell = CreateObject("Shell.Application")
       Set objWindowsFolder = objShell.BrowseForFolder(0, "Select a Windows folder:", 0, "")

       If Not objWindowsFolder Is Nothing Then

          For Each objItem In objSelection
              If TypeOf objItem Is ContactItem Then
                 Set objContact = objItem

                 'Save the contact business card images
                 strWindowsFolder = objWindowsFolder.self.Path & "\"
                 strBusinessCard = strWindowsFolder & objContact.FullName & ".jpg"
                 objContact.SaveBusinessCardImage (strBusinessCard)
              End If
          Next

          'Open the windows folder
          Shell "Explorer.exe" & " " & strWindowsFolder, vbNormalFocus
       End If
    End If
End Sub

VBA Code - Batch Export the Business Card Images of Multiple Contacts

  1. Subsequently, exit the VBA editor.
  2. Later, add this macro to Quick Access Toolbar or ribbon.
  3. Eventually, take the following steps to try this macro.
  • First, select the contacts that you want.
  • Then, click the macro button in Quick Access Toolbar.Click Macro Button
  • Next, in the new dialog box, select a target Windows folder and hit “OK”.Select Windows Folder
  • At once, the folder will be displayed, in which you can find the exported business card images, as shown in the following figure.Exported Business Card Images

Salvage Outlook Data after Corruption

Like other software, Outlook can crash from time to time. In the best cases, you’ll find nothing bad occurs to your Outlook. Nevertheless, at its worst, Outlook PST file can become corrupt straightforward. At that time, you have no alternative but to employ a proficient Outlook repair tool, such as DataNumen Outlook Repair to fix Outlook file.

Author Introduction:

Shirley Zhang is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including sql repair and outlook repair software products. For more information visit www.datanumen.com

Comments are closed.