3 Quick Ways to Remove Hyperlinks from Pictures in Your Word Document

In this article, we would like to exhibit you 3 quick ways to remove hyperlinks from pictures in your Word document.

Sometimes, when copy a picture online, we find it embedded with a hyperlink. And in a Word document, accidentally clicking on the picture may lead you to the net address of the picture. This is not only irritating but messes up the visual effect of your document, such as below:Picture with a Hyperlink

Therefore, we choose to remove hyperlinks from pictures to avoid such unexpected page jump. Here we go.Remove Hyperlinks from Pictures in Your Word Document

Method 1: Remove Hyperlink from one Picture

  1. Firstly, right click on a picture.
  2. Then on the contextual menu, choose “Remove Hyperlink”.Right Click on a Picture->Choose "Remove Hyperlink"

Method 2: Batch Remove Hyperlinks from All Pictures in a Document

There is the way to remove all hyperlinks from a document. First you press “Ctrl+ A” to select all contents. Then you press “Ctrl+ Shift+ F9” to kill all hyperlinks. For your information, this way clears all hyperlinks both on pictures and texts. Yet, our aim is to remove hyperlinks from pictures only. So we will have to utilize a macro to finish the job.

  1. First of all, press “Alt+ F11” to trigger the VBA editor in Word.
  2. Then in the editor, click on “Normal” project.
  3. Next on the menu bar, click “Insert”.
  4. And choose “Module” on the drop-down menu.Click "Normal"->Click "Insert"->Click "Module"
  5. Now double click on the module to open its coding area on the right and paste the following macro there:
Sub RemoveAllHyperlinksFromPicturesInOneDocument()
  Dim objInlinePicture As InlineShape
  Dim objPicture As Shape
 
  If ActiveDocument.InlineShapes.Count > 0 Then 
    For Each objInlinePicture In ActiveDocument.InlineShapes
      objInlinePicture.Select
 
      While Selection.Hyperlinks.Count > 0
        Selection.Hyperlinks(1).Delete
      Wend 
    Next
  End If

  If ActiveDocument.Shapes.Count > 0 Then 
    For Each objPicture In ActiveDocument.Shapes 
      objPicture.Select
 
      While Selection.Hyperlinks.Count > 0
        Selection.Hyperlinks(1).Delete
      Wend 
    Next 
  End If
End Sub
  1. Last but not the least, click “Run” on menu bar to execute codes.Paste Macro->Click "Run"

Method 3: Batch Remove Hyperlinks from Pictures in Multiple Documents

  1. Before all, arrange all target documents in one folder.
  2. Then repeat steps in method 2 to install and run the following macro:
Sub RemoveAllHyperlinksFromPicturesInMultipleDocuments()
  Dim objInlinePicture As InlineShape
  Dim objPicture As Shape
  Dim StrFolder As String
  Dim strFile As String
  Dim objDoc As Document
  Dim dlgFile As FileDialog

  Set dlgFile = Application.FileDialog(msoFileDialogFolderPicker)
 
 
  With dlgFile
    If .Show = -1 Then
      StrFolder = .SelectedItems(1) & "\"
    Else
      MsgBox ("No Folder is selected!")
      Exit Sub
    End If
  End With
 
  strFile = Dir(StrFolder & "*.doc*", vbNormal)
 
  While strFile <> ""
    Set objDoc = Documents.Open(FileName:=StrFolder & strFile)
    Set objDoc = ActiveDocument
 
    If ActiveDocument.InlineShapes.Count > 0 Then
      For Each objInlinePicture In ActiveDocument.InlineShapes
        objInlinePicture.Select 
        While Selection.Hyperlinks.Count > 0
          Selection.Hyperlinks(1).Delete
        Wend
      Next
    End If

    If ActiveDocument.Shapes.Count > 0 Then
      For Each objPicture In ActiveDocument.Shapes
        objPicture.Select 
        While Selection.Hyperlinks.Count > 0
          Selection.Hyperlinks(1).Delete
        Wend
      Next
    End If

    objDoc.ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
    objDoc.Save
    strFile = Dir()
  Wend
End Sub
  1. In the “Browse” window open, pick the folder you set in step 1 and click “OK” to move on.Choose the Folder->Click "OK"

Be Cautious about Your Operation in Word

Word is not foolproof, so any wrong operation may easily trigger the collapse or worse, resulting document corruption. While you can pay more attention to your operation skills and habits, you can also purchase a utility for doc recovery beforehand.

Author Introduction:

Vera Chen is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including recover xls and pdf repair software products. For more information visit www.datanumen.com

One response to “3 Quick Ways to Remove Hyperlinks from Pictures in Your Word Document”

Leave a Reply

Your email address will not be published. Required fields are marked *