Saturday, May 13, 2017

How to remove all hyperlinks in Ms Powerpoint presentation file with one click

When you copy-and-paste a picture from your local disk or from Internet source to your Ms Powerpoint presentation slide, you might unconsciously also created an embedded hyperlink inside the picture which link back to its source.

You might want to remove/delete all those hyperlinks in your presentation slides, as you don't want them to surprise you (and your audiences) in the middle of your presentation, in case you accidentally clicked on the picture and it starts to open up your web browser, searching and connecting to the source of that picture.

Well, you can remove the hyperlinks one by one, by right clicking on the picture and select "Remove hyperlink" from the popup menu.


However, it will be extremely tedious and inconvenient, as Ms Powerpoint unable to tell you which picture got hyperlink and which one doesn't have. You will need to check and unlink all of them one by one, and you are very likely to miss out some of them.

Here is a method which enable you to remove all those hyperlinks in the entire Ms Powerpoint presentation file at one go.

In this method, you create a simple macro program to automatically remove all the hyperlinks one by one at the background, and report back how many hyperlinks removed when it finished. When you save your presentation file, the macro won't be saved together so your file remains clean.

Step 1: Open your Ms Powerpoint presentation file.

Step 2: Press Alt+F8. That will open the Macro window.

Step 3: Enter "Rmlinks" as macro name (or any name you like, as it is for temporary use only), and click the Create button.

Step 4: Copy and paste the following codes into your macro editor.

Sub Rmlinks()
 Dim slide As slide
 Dim index As Long
 Dim counter As Long
 counter = 0
 For Each slide In ActivePresentation.Slides
    For index = slide.Hyperlinks.Count To 1 Step -1
       slide.Hyperlinks(index).Delete
       counter = counter + 1
    Next index
 Next slide
 MsgBox ("Removed " + CStr(counter) + " link(s).")
End Sub


Step 5: Press the F5 button on your keyboard to run. If it pop up another window, just click on the Run button to run.

Step 6: Press OK after seeing the result of how many hyperlinks successfully removed.


Step 7: You can now close the Macro window by clicking on the [X] in red at its top right corner, the same way you close any other windows.

When you save your file, the following dialog box might appear. Just press the "Yes" button.


Now, you have your Ms Powerpoint presentation slides the same as before, but clean from all the unwanted hyperlinks.

7 comments:

  1. This is a cool tips! Thanks for sharing!

    Your loyal silent reader *ahem*

    ReplyDelete
  2. You saved me SO MUCH TIME!!! Thank you!!

    ReplyDelete
  3. you there sir, your a legend , have my thanks

    ReplyDelete
  4. Super helpful, thanks a lot! Little detail: today was trying and i wasnt able to create any new macro and i discovered after much discussion and testing with a colleague that this cannot be done on a document if it's not saved on your computer; if the ppt is in a onedrive folder, no luck.

    ReplyDelete