Automatically Remove all Hyperlinks in Microsoft Word with VBA
7:24

Automatically Remove all Hyperlinks in Microsoft Word with VBA

Teacher's Tech 30.11.2022 4 741 просмотров 102 лайков обн. 18.02.2026
Поделиться Telegram VK Бот
Транскрипт Скачать .md
Анализ с AI
Описание видео
In this video tutorial, I will show you how to remove all links in a Microsoft Word document in a single click. Rather than removing the hyperlinks one by one, you will quickly use VBA to add two short lines of code to perform this. Run the macro and the links are gone. Save this Macro and add it as a shortcut to quickly run it anytime you need it. Practice file download: https://bit.ly/RemoveLinks Copy paste the following code: Selection.WholesStory Selection.Fields.Unlink More word tutorials: https://youtube.com/playlist?list=PLmkaw6oRnRv9-nqM7qW2aWkaKU6SfersL

Оглавление (8 сегментов)

  1. 0:00 Introduction 85 сл.
  2. 0:26 Overview 124 сл.
  3. 0:59 Customize Ribbon 83 сл.
  4. 1:24 Developer Tab 61 сл.
  5. 1:44 Macro 277 сл.
  6. 3:08 Run Macro 152 сл.
  7. 3:54 Create Macro Shortcut 289 сл.
  8. 5:26 Replace 353 сл.
0:00

Introduction

welcome to teachers Tech my name is Jamie  and it's great to have you here today today   I want to show you how you can remove all  the hyperlinks in a Microsoft Word document   in a single click so that you don't have  to go through each one and start editing   the hyperlinks through here because that  can take a long time if you have a long   document with a lot of links let me show  you how to do this today on teachers Tech
0:26

Overview

so we are going to be using VBA today to create  a macro that will be able to run to automatically   get rid of all those links inside your word  document but don't be scared off by this because   the coding that we're going to do is super easy  it's going to be two short lines and once you   create it it'll be good for as long as you need  it and you can add some shortcuts to use it I'm   going to show you how to do that too okay so first  step is actually to turn on our developer tab if   you look across my tabs I've turned it off I  had it on before but it's not on my default so
0:59

Customize Ribbon

I need to turn this on now you can access this in  a couple of different ways the way I do it I just   right click up here in the menu bar and then you  can see that we can go to customize ribbon and   then I here and go down  and you'll see so we're under the main tabs here   there's developer right here so I'm just going to  click on this and hit OK and now if I look at my
1:24

Developer Tab

tabs I have developer right there you can access  this through your options when you go back to home   and under options as well but I just tend to use  that shortcut the way I showed you okay so what's   the next step now we need to start our macro so  we're going to go over to our developer tab right
1:44

Macro

here and you're going to see that we have macros  and so I want you to go ahead and click this and   first of all we need to give our macro a name so  what I'm going to call this is remove links but we   can't have any spaces in it I'm just going to call  it just like this so when I go ahead I get a name   there I can go ahead and hit create and then it's  going to open up VBA so Microsoft Visual Basic for   applications but don't be scared of this again  we're not going to add too much to this we're   just going to add a couple lines of code and I'm  going to paste mine in right here where the   cursor is I'm just going to go Ctrl V I already  had it selected I'm just going to hit enter once   here so you can see it so this is what you need  to type in and I'm actually going to put it down   below in the description so you can just copy and  paste it into this as well but it's selection dot   whole story so when this runs it selects the whole  story in here it will select all my text and then   it will do this so the selection Fields it will  unlink any links in it so that's all we need to   do we can actually just close out of this so let's  go ahead and I'm just going to go up top and I'm   going to go to close out you can see the shortcuts  there just hit close Okay so we've created this
3:08

Run Macro

macro we can get to it in a couple different ways  if I go under uh view here you can actually find   it if we go drop down under macros we could go  view macros and I can run it by just clicking   run so click run and it's done it looks like  it's all selected but what I want to show you is   that now if I go to any of these links they're not  links anymore so I'm just going to go undo here   one more time and so just to show you before that  these were all links if I just click on them here   any of them we can go ahead and see that there's  links there so I'll do this one more time we just   go up to our macros view macros run and just click  off it and you can see all the links through this
3:54

Create Macro Shortcut

are gone now I'm going to show you in a moment too  how you can quickly get rid of all this underlying   underlining and colors without having to go to  each one in a moment too but what I want to show   you now is actually how to add a shortcut so we  can have our macros run it this way but you can   actually create a shortcut out of your Macros  too so to do this I'm going to go back to my my   customize the ribbon I'm just right clicking up  here in the ribbon and I'm going to open this up   we can create a shortcut for this macro so if  we go to customize here and then you can see if   I scroll all the way down here there's macros  so I have this remove links this is the macro   that we created here I can go ahead and create  a shortcut for this and so what I can do now   I'd recommend using your alt control and shift  Keys all at the same time and then adding another   letter so that you don't get mixed up with any  of the default word shortcuts so I'm just going   to go hold down alt control and shift and I'm  going to add an r in there so I can see that we   have my new shortcut key here and I'm just going  to hit assign and close like this and I hit OK so   now if I was going to go and use my ALT control  shift and R you can see it's running the macro at   the same time so you can create these shortcuts  for this by doing what I just showed you here
5:26

Replace

okay so now the problem is we took away all our  uh all the different links but now the formatting   you can actually just use replace and go through  the whole document and replace this using uh so   what I'm going to do is go up back to my home  here so I'm going to go all the way over here   to just select replace and when this opens up what  I want to do is actually go to more because we're   going to actually search for the uh it being  underlined and we're going to change it to   not being underlined and change the color back  to normal so what is it we want to find so I'm   going to select it up here and then I'm going to  go down to format and I'm going to choose font so   what is it I'm looking for so I'm going to find  things that are underlined here and just hit ok   now what do I want to have happen well I want the  things that it finds underlined here are going to   be I'm going to just go back to my font again with  replace with and we'll say replace with none make   sure that we have no underline and we'll make it  just automatic like this so that it's going to   replace with the automatic color and hit OK so  let's try it just once hit replace and   well actually we'll get replace all so I'm going  to hit OK I'm going to close out of this now and   you can see all of those are gone so it's a quick  way to change your formatting using the replace by   just looking at the font if you did have all those  underline so I hope you like this tutorial today   on how to remove hyperlinks with a single click  automatically using VBA and creating those macros   let me know what else you're looking to learn with  Microsoft Office or Excel or other Tech thanks   for watching this week on teachers Tech I'll see  you next time with more Tech tips and tutorials

Ещё от Teacher's Tech

Ctrl+V

Экстракт Знаний в Telegram

Транскрипты, идеи, методички — всё самое полезное из лучших YouTube-каналов.

Подписаться