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:
Therefore, we choose to remove hyperlinks from pictures to avoid such unexpected page jump. Here we go.
Method 1: Remove Hyperlink from one Picture
- Firstly, right click on a picture.
- Then on the contextual menu, 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.
- First of all, press “Alt+ F11” to trigger the VBA editor in Word.
- Then in the editor, click on “Normal” project.
- Next on the menu bar, click “Insert”.
- And choose “Module” on the drop-down menu.
- 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
- Last but not the least, click “Run” on menu bar to execute codes.
Method 3: Batch Remove Hyperlinks from Pictures in Multiple Documents
- Before all, arrange all target documents in one folder.
- 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
- In the “Browse” window open, pick the folder you set in step 1 and click “OK” to move on.
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
1