3 Ways to Add the Contact Groups Attached in an Email to Your Outlook Contacts Folder

If you’ve received an email which is attached with several contact groups, you may want to quickly add these contact groups to the Contacts folder in your Outlook. So, this article will share 3 means with you.

When some contact groups are emailed to you as attachments, before using it for sending email, you have to firstly save them to your Contacts folder. In this case, you must long for quick solutions to realize it. Therefore, in the followings, we’ll introduce you 3 approaches.

Add the Contact Groups Attached in an Email to Your Outlook Contacts Folder

Method 1: Copy Attached Contact Groups to Contacts Folder One by One

  1. First of all, open the source email.
  2. Then, double click on an attached contact group to open it.Open an Attached Contact Group
  3. Next, in the opened Contact group window, click on “File” button in the upper left corner.
  4. After that, in the new screen, you can see a “Move to Folder” button. Click on it and select “Copy to Folder” option from its drop down list.Copy to Folder
  5. Subsequently, in the new popup dialog box, select a Contacts folder and then hit “OK” button.Select Folder
  6. At once, the attached contact group would be added to the selected folder.
  7. Now, you can repeat the Step 2 to 5 to add the other attached contact groups to Contacts folder.

Method 2: Batch Drag & Drop Attached Contact Groups to Contacts Folder

  1. To begin with, access to a Contacts folder in the main Outlook window.
  2. Then, hold down “Shift” button and click on the Outlook icon in the task bar to open another Outlook window.
  3. Next, in the new Outlook window, open the source email.
  4. Subsequently, select all the attached contact groups.
  5. Afterwards, shrink the two windows until seeing them in the same screen.
  6. Finally, drag and drop the selected contact group attachments to the Contacts folder, like the screenshot:Batch Drag & Drop Attached Contact Groups to Contacts Folder

Method 3: Add Attached Contact Groups to Contacts Folder with VBA

  1. In Outlook, access the VBA editor according to “How to Run VBA Code in Your Outlook”.
  2. Then, put the following VBA code into an unused module.
Sub AddAttachedGroupsToContactsFolder()
    Dim objMail As Outlook.MailItem
    Dim strTempFolder As String
    Dim objAttachment As Outlook.Attachment
    Dim strFilePath As String
    Dim objExtractedGroup As Outlook.DistListItem
    Dim objContactsFolder As Outlook.Folder
    Dim objDictionary As Object
    Dim strkey As String
    Dim objContactGroup As Outlook.DistListItem
 
    'Get the source email
    Select Case Application.ActiveWindow.Class
           Case olExplorer
                Set objMail = ActiveExplorer.Selection(1)
           Case olInspector
                Set objMail = ActiveInspector.CurrentItem
    End Select
 
    'Add the attached contact groups to default Contacts folder
    strTempFolder = Environ("Temp") & "\" & "TEMP " & Format(Now, "YYYY-MM-DD hh-mm-ss")
    MkDir (strTempFolder)
    For Each objAttachment In objMail.Attachments
        If Right(objAttachment.FileName, 3) = "msg" Then
           strFilePath = strTempFolder & "\" & objAttachment.FileName
           objAttachment.SaveAsFile strFilePath
        End If
 
        On Error Resume Next
        Set objExtractedGroup = Session.OpenSharedItem(strFilePath)
        objExtractedGroup.Copy
    Next
 
    'Remove the duplicate groups
    Set objContactsFolder = Application.Session.GetDefaultFolder(olFolderContacts)
    Set objDictionary = CreateObject("scripting.dictionary")
    For i = objContactsFolder.Items.Count To 1 Step -1
        If TypeOf objContactsFolder.Items(i) Is DistListItem Then
           Set objContactGroup = objContactsFolder.Items(i)
           strkey = objContactGroup.DLName
           strkey = Replace(strkey, ", ", Chr(32))
 
           If objDictionary.Exists(strkey) = True Then
              objContactGroup.Delete
           Else
              objDictionary.Add strkey, True
           End If
        End If
    Next
End Sub

VBA Code - Add Attached Contact Groups to Contacts Folder

  1. Later, add the new macro to Quick Access Toolbar.
  2. Finally, you can try it.
  • For a start, select or open an email.
  • Then, click on the macro button in Quick Access Toolbar.Run Macro on Selected Email
  • At once, the contact groups will be added to the default Contacts folder.Success Effect

Restore Outlook Data after Unforeseen Crashes

Though Outlook provides users with a great amount of excellent functions, it still cannot get immune from errors or crashes. Therefore, it is essential for users to keep prepared for all potential incidents in Outlook, such as backing up PST files, getting hold of a reliable and plummy Outlook fix utility, like DataNumen Outlook Repair.

Author Introduction:

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

Comments are closed.