How to Use Card Image Instead of Icon when Inserting a Business Card in Outlook

By default, when you insert a business card to the body of contact, contact group, appointment or task, only a card icon will be inserted. If you would like to make the business card image auto inserted, you can read this article. 

In an Outlook appointment, task, contact, or contact group, if you want to insert the business cards, you can go to “Insert” tab and click “Business Card” button. By this means, only the card icon can be inserted, as shown in the figure below. Yet, exactly, you hope to see the business card image. Hence, in the followings, we will show you a quick way to auto replace the card icon with card image. Here will take contact group as an example to introduce how to get it.

Default Business Card Icon

Use Card Image Instead of Icon when Inserting a Business Card

  1. To begin with, trigger Outlook VBA editor with reference to “How to Run VBA Code in Your Outlook“.
  2. Then, in the new window, add “MS Word Object” according to “How to Add an Object Library Reference in VBA“.
  3. Next, put the following code into “ThisOutlookSession” project.
Public WithEvents objInspectors As Outlook.Inspectors
Public WithEvents objContactGroup As Outlook.DistListItem

Private Sub Application_Startup()
    Set objInspectors = Outlook.Application.Inspectors
End Sub

Private Sub objInspectors_NewInspector(ByVal Inspector As Inspector)
    If TypeOf Inspector.CurrentItem Is DistListItem Then
       Set objContactGroup = Inspector.CurrentItem
    End If
End Sub

Private Sub objContactGroup_AttachmentAdd(ByVal Attachment As Attachment)
    Dim objContacts As Outlook.Items
    Dim strContactName As String
    Dim objFoundContact As Outlook.ContactItem
    Dim strBusinessCard As String
    Dim objTempMail As MailItem
    Dim objMailDocument As Word.Document
    Dim objGroupDocument As Word.Document
    Dim objDocSelection As Word.Selection
 
    On Error GoTo ErrorHandler
    'If the new attachment is a vcard file
    If Right(Attachment.FileName, 4) = ".vcf" Then
       strContactName = Left(Attachment.FileName, Len(Attachment.FileName) - 4)
 
       Set objContacts = Outlook.Session.GetDefaultFolder(olFolderContacts).Items
       Set objFoundContact = objContacts.Find("[FullName] = '" & strContactName & "'")
 
       If Not (objFoundContact Is Nothing) Then
          'Copy the Contact Business Card to "Notes" Section
          Set objTempMail = objFoundContact.ForwardAsBusinessCard
          objTempMail.Display
          Set objMailDocument = objTempMail.GetInspector.WordEditor
          objMailDocument.InlineShapes(1).Range.Copy
 
          Set objGroupDocument = objContactGroup.GetInspector.WordEditor
          objGroupDocument.Range(0, 0).PasteAndFormat (wdFormatOriginalFormatting)
 
          objTempMail.Close olDiscard
       End If
 
        'Delete the Card Icon
        Attachment.Delete
    End If
 
ErrorHandler:
    Exit Sub
End Sub

VBA Code - Use Card Image Instead of Icon when Inserting a Business Card

  1. After that, click into the first subroutine and hit “F5”.
  2. Now, follow the steps below to have a try.
  • First off, open a contact group and click “Notes” in “Show” group.
  • Next, shift to “Insert” tab.
  • Subsequently, click “Business Card” button and choose “Other Business Cards”.Click "Business Card" Button
  • In the popup dialog box, select a contact and click “OK”.Select Contact
  • The selected contact’s business card image will be inserted, not the card icon. See the following figure.Inserted Business Card Image

Insulate Outlook against Potential Risks

In face of many risks, such as viruses, human errors, system failures, etc., Outlook is actually defenseless. This is why Outlook is prone to corruption. So as to block Outlook data from damage or loss, users have to make many precautions, such as maintaining consistent and updated PST backups, keeping all viruses at bay and bringing in a powerful fix tool, like DataNumen Outlook Repair. It can recover PST file effortlessly.

Author Introduction:

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

Comments are closed.