How to Batch Hide All Embedded Images with a Hyperlink in Your Outlook Email

If you would like to hide all the embedded images with a hyperlink in an Outlook email, you can read this article. Here we’ll guide you to accomplish it with effortless ease.

For instance, you receive an email which contains multiple pictures embedded in the message body. Also, some images have been attached with a hyperlink. In this situation, if you accidentally click on such an image, it will bring out the new web site in your default internet browser. It seems quite troublesome. Therefore, you may long for methods to batch hide all of the images with a hyperlink. In the followings, we will share one with you.

Batch Hide All Embedded Images with a Hyperlink in Email

  1. For a start, in Outlook, tape on “Alt + F11” to run VBA editor.
  2. Then, enable “MS Word Object” by referring to the article – “How to Add an Object Library Reference in VBA“.
  3. Later, put the VBA code below into an unused module.
Sub HideImagesWithHyperlinks()
    Dim objMail As Outlook.MailItem
    Dim objMailDocument As Word.Document
    Dim objInlineShape As Word.InlineShape
    Dim objShape As Word.Document

    Set objMail = Outlook.Application.ActiveInspector.CurrentItem
    Set objMailDocument = objMail.GetInspector.WordEditor
    'Process inline shapes
    If objMailDocument.InlineShapes.Count > 0 Then
       For Each objInlineShape In objMailDocument.InlineShapes
           If Not (objInlineShape.Hyperlink Is Nothing) Then
              'Hide the inline shapes with Hyperlink
              objInlineShape.Range.Font.Hidden = True
              'To get back hidden inline shapes. use the line below
              'objInlineShape.Range.Font.Hidden = False
           End If
    End If
    'Process shapes
    If objMailDocument.Shapes.Count > 0 Then
       For Each objShape In objMailDocument.Shapes
           If Not (objShape.Hyperlink Is Nothing) Then
              objShape.Range.Font.Hidden = True
           End If
    End If
End Sub

VBA Code - Batch Hide All Embedded Images with a Hyperlink in Email

Note: The above macro works to hide all the images with hyperlink. If you want to delete such images, you can change the code as per the inline comments.

  1. After that, add this macro to Quick Access Toolbar of message window. About how, read “How to Run VBA Code in Your Outlook“.
  2. Ultimately, take the following steps to have a try.
  • First off, open the email.
  • Then, click the newly added macro button in Quick Access Toolbar.
  • At once, all the images with hyperlink will be hidden, like the screenshot belowHide All Images with a Hyperlink
  • If you want to get them back, you can click on the “Undo” button in Quick Access Toolbar or press “Ctrl + Z” key shortcuts.Undo "Hiding"

Keep All Potential Risks around Your Outlook at Bay

It’s known that Outlook is susceptible to errors and damage. Thereby, you have to keep tabs on all potential dangers surrounding your Outlook, such as email borne viruses, malware, human errors or software faults, etc. In a nutshell, you ought to keep Outlook far away from them. Otherwise, once your Outlook gets attacked, it is very likely that your PST file may get compromised. At that time, you need take aid of a potent Outlook fix tool, such as DataNumen Outlook Repair, to rescue the valuable PST data.

Author Introduction:

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

Comments are closed.