Remove All Hyperlinks in Word or Excel
These two nifty macros enable you to delete the embedded hyperlinks that are generated when typing URLS or copying information from the web.
Ever copy and paste something from the Internet and then into Word only to get the hyperlinks embedded? You can removed them easily with the Macros below.
Word
Hit [ALT]+[F11] to open the Visual Basic Editor
Go to “Insert” > “Module” and in the pop-up window copy:
Sub RemoveHyperlinks()
Dim oField As Field
For Each oField In ActiveDocument.Fields
If oField.Type = wdFieldHyperlink Then
oField.Unlink
End If
Next
Set oField = Nothing
End Sub
Then click “File” > Close and return to Microsoft Word
You can now run the Macro in Word by going to:
Tools > Macro > Macro and then Run “RemoveAllHyperlinks”
Excel:
You can do the same in an Excel Document:
Hit [ALT]+[F11] to open the Visual Basic Editor
Go to “Insert” > “Module” and in the pop-up window copy:
Sub RemoveHyperlinks()
'Remove all hyperlinks from the active sheet
ActiveSheet.Hyperlinks.Delete
End Sub
Then click “File” > Close and return to Microsoft Excel
You can now run the Macro in Excel by going to:
Tools > Macro > Macro and then Run “RemoveAllHyperlinks”, this will delete all URLS on the selected worksheet.







Anonymous said on October 19, 2008
Very good.
Have been attempting to find a solution for some time.
This macro cleared all links in a very large file at the first attempt.
Dehkay
fhff said on October 28, 2008
Awesome!!!!!!! saved me so much time lol thanks
James said on October 29, 2008
very nice! thanks for the tip!
Scott said on November 4, 2008
THANK YOU! 1 Million ties thank you!!
Umer said on November 5, 2008
Awesome work, after learning such thing, I feel like a geek ;-)
Student said on November 6, 2008
Select the entire block of text, then press Ctrl-Shift-F9. Presto: No more hyperlinks. In their place, plain text.
Will said on November 10, 2008
Wow, very helpful! Thank you!
gurinder said on November 11, 2008
thanks …
very very nice.. was so easy with your help
gurinder singh
agun said on December 4, 2008
owo great …. thank u …
Shivshanker Cheral said on December 4, 2008
Also by presssing Ctrl + 6 we can do this!
Shivshanker Cheral said on December 4, 2008
you can remove hyperlink using Ctrl+6 also
Nishant said on December 7, 2008
Hey
I ran the above macro during a term paper that i was working on, in MS Word 2007.
Works great – removed all the hyperlinks….
Thanks ALOT!!
john said on December 17, 2008
Very useful to me. Thank you so much :D :D
Blandoo said on December 18, 2008
Somehow this does not work for javascript embedded within a picture (buttons). Please let me know if there is a “Remove all Javascript” macro I can run.
Thanks
Rusty said on December 20, 2008
Worked like a charm for removing all hyperlinks – thanks
sil said on December 22, 2008
Many Thanks for this help, Muchly appreciated
me said on January 16, 2009
ok.. it works… thanks a lot.. i’ve been loocking for this.. just not hard enough until now because i didn’t have that much text copied.. it actually took me 2 minutes to find this… and it’s great.. and u actually don’t need to know anything.. just follow the easy instructions
shabi said on January 20, 2009
it’s really very good
Dan said on January 26, 2009
In Office 07 for words. The macro section is under the “view tab” to the far right.
orpheus said on February 12, 2009
Thank you very much. It’s very useful.
tabi said on February 19, 2009
This didn’t work for me…maybe a problem with Excel 2007? Or my stupidity, it’s tough to say.
CasuaL said on March 15, 2009
Great work, thanks a lot :)
Bob said on March 28, 2009
Excellent – saved me having to remove 700+ hyperlinks by hand.
Super huge thanks
Sridhar said on April 11, 2009
Marvellous
Jason said on April 17, 2009
Damn Nice!
Thank you so much.
sasikanth said on April 21, 2009
it nice it working thanks
Najen said on April 22, 2009
Hi here is code to remove all shapes which include objects ActiveX controls (Control Toolbox) or a linked or embedded OLE objects,Controls from the Forms toolbar
,Controls from the Drawing toolbar,Pictures, chartsactive x,buttons,pcitures,drop down lists etc.It will basically remove all these objectsActiveX controls. even cell comments but not cell comments
Code:
Sub Shapes1()
‘Delete all Objects except Comments
On Error Resume Next
ActiveSheet.DrawingObjects.Visible = True
ActiveSheet.DrawingObjects.Delete
On Error GoTo 0
End Sub
prasad said on April 23, 2009
very very very very very thanks
Johnny said on May 1, 2009
Thank you very much.
Made my life a whole lot easier. =D
Anji said on May 5, 2009
THANKS that’s great! Saved me precious time. Worked on my mac too.
k said on May 12, 2009
gr8! saves me a lot of time.
Andy McDandy said on May 27, 2009
Thanks a lot..great help
Prashanth said on June 15, 2009
just copy to notepad and paste it back!
adam said on June 16, 2009
I have been ALWAYS looking for this.
Didn’t know I’d ever FIND it, just by googling. Congrats. GREAT CODE!
ivica said on July 1, 2009
TNX
nox13666 said on July 10, 2009
Thanks, this worked
Anonymous said on July 20, 2009
how to enable hyperlink, after removing it using VB..?
Kevin said on August 16, 2009
Thank you for your help. This is a command that Microsoft clearly forgot to add. Great job! Although I have written plenty of macros (mostly on Excel, but a few in Word), I was not excited about adding to my already large set of macros… but I’m glad that I did. It works perfectly!
Thanks
Heather Arndt Anderson said on August 27, 2009
God, thank you! This is so clean and direct, without entering a bunch of dummy data to sidestep the problem. Thank you so much.
ADTC said on September 9, 2009
There’s another tip that says to select all text and clear formatting. But this makes it lose formatting.
I found yet another way, just select some normal text in the paragraph and click the Format Painter. Then select all the text where you want hyperlinks removed. The text retains most of the formatting (except when it disagrees with the original text selected before clicking Format Painter).
Vanessa said on September 16, 2009
OMFG thx u! it works! i am soooo hppy! :D
Anonymous said on October 6, 2009
Adding another thank you to the list!
Anonymous said on October 7, 2009
Very Very Thanks
Anonymous said on October 7, 2009
yes its also working good
thanks dear
Anonymous said on October 7, 2009
i need macro programs pls send your macros what u have.
tks
Jay said on November 3, 2009
Thank You, this worked like a dream.
Anonymous said on November 10, 2009
dude whoever you are
u rock
this is excellant
me said on November 14, 2009
cool. never used a macro before :)
Si said on November 18, 2009
THANKS! This was really handy when pasting Wikipedia articles into Word
Pirnima said on November 25, 2009
Thank You So much .. my file size has been reduced by half… Thank you really I have been looking for a solution since 3 years!!
Is there a way where you can can keep the hyperlinks in one column that you want .. and remove it from the rest of the sheet?
ADTC said on November 25, 2009
That’s strange. How do hyperlinks make your file two times bigger? Anyway to selectively remove hyperlinks, I posted the following in a previous comment (2 months ago) for Word:
—-
There’s another tip that says to select all text and clear formatting. But this makes it lose formatting.
I found yet another way, just select some normal text in the paragraph and click the Format Painter. Then select all the text where you want hyperlinks removed. The text retains most of the formatting (except when it disagrees with the original text selected before clicking Format Painter).
—-
As for Excel, you can try the second way there too! Just select a cell with normal text, then click (or double-click if you want to do multiple times) the Format Painter, then select the columns with hyperlink that you want removed. Remember that all the selected columns will have the same formatting as the original cell you selected.
Well apparently I discovered that in both Word and Excel, it doesn’t actually remove the hyperlink but only make the formatting of the link similar to the normal text you selected. This means the links no longer look like links anymore (it looks like normal text now), but when you click on it, it still launches your browser to navigate to the link address.
Anonymous said on December 18, 2009
Thanks for the help. It helped me & saved my time.
Humza Bobat said on December 28, 2009
Very Useful Stuff :-)
Anonymous said on December 30, 2009
i don’t know delete hyperlink in Microsoft Office Word 2003
Anonymous said on January 3, 2010
I just wanted to ad something if one wants to use the same with Office 2007 or later.
The procedure is just the same but in order to execute it we need to click on office button, then change the Popular Commands Drop Box to Macros.
Click on the remove…..
Add>
Done!
Anonymous said on January 4, 2010
Or…select all the text and press CONTROL+6
Tom said on January 15, 2010
Thanks for the MS word solution. I couldn’t figure out how to get rid of those stupid hyperlinks. Very greatful.
Tom said on January 15, 2010
Thanks for the MS word solution. I couldn’t figure out how to get rid of those stupid hyperlinks. Very greatful.
Anonymous said on January 18, 2010
THANK YOU X 100000000000000000000000000000000000000000000. I had over a week long work load of deleting these and this did it in seconds!!!!!!!!!!
Jim said on January 22, 2010
My only question is, why isn’t this option in the program to begin with? Answer: Microsoft.
A.D.E.Cyber Emporium said on February 4, 2010
Thanks for the info.
Saved heaps of time and was so easy to do.
A+
Research said on February 17, 2010
In MS word
select all [CTRL + A]
then CONTROL + SHIFT + F9. …
NO NEED FOR VBA… Simple and fun….
Mike said on February 18, 2010
Thanks worked great…..the first time, when i tried it a second time it went all grey, i couldnt paste the information into another word document or anything. A bit anoying :-(
BentSpork said on February 25, 2010
Great code, but it doesn’t go into the footnotes. here is code for footnotes using the Selection approach:
ActiveWindow.ActivePane.View.SeekView = wdSeekFootnotes
‘ Select all text in the footnotes.
Selection.WholeStory
‘ Loop through fields in selection.
For Each aField In Selection.Fields
‘ If field type is a Hyperlink field.
If aField.Type = wdFieldHyperlink Then
aField.Unlink
End If
Next aField
‘ Close Footnotes and return to document
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
adam page said on March 1, 2010
Thanks for this :)
Anonymous said on March 7, 2010
thank you dost.
VIKI said on March 18, 2010
WOW REALLY GREAT TIP….. I WAS SEARCHIN FOR THIS TIP
Anonymous said on March 30, 2010
AWESOME !!!! You saved my whole day !!!
Anonymous said on April 14, 2010
It was awesome!! This perfectly works for me!! I have one doubt. Will this changes reflects in other system which doesnt have macros.
Thanks,
Krithika
Laptop Repairs said on April 15, 2010
That saved me like 4 hours of workload. Can’t tahk you more. Thanks a bunch~!
Anonymous said on April 22, 2010
Thank You…. works a treat
ashley said on April 30, 2010
I want it to not paste as a hyperlink in any document. I don’t want to have to remove them in each document.
I know how to copy a #1 and hold control and select all the links I want to disable and paste special and choose multiply to make all links go away. Then I have to reformat the text to match surrounding text. (change from blue to black and remove underline)
mickey said on May 4, 2010
It’s a beautiful thing. Thanks so much…
Anonymous said on May 6, 2010
This helped me no end with a big problem I was having on some huge spreadsheets! Thank you very much
Larry Orr said on May 13, 2010
What versions of Work and Excel are you talking about? Are these Windows or Mac commands? In other words, more info is needed.
samir said on May 24, 2010
Hello Umer
samir said on May 24, 2010
Hello Umer
nick said on May 25, 2010
made my day, saved my ass, thanks
Henri said on May 29, 2010
Thank you
Lune said on May 31, 2010
Thanks a lot!
Scott said on June 10, 2010
Awesome – thanks!
Umir said on June 18, 2010
Hello Samir
Umir
Aakarsh said on June 21, 2010
very gud post
thnx for the information
nora said on June 21, 2010
Ctrl-Shift-F9!
IT WORKS!
Elegant simple and it works!
THANK YOU STUDENT PERSON!!!
Ishaan said on June 24, 2010
One new IDEA!!!!!
Press Ctrl+6
And all the links will disapear in a second
Ishaan said on June 24, 2010
One More Ctrl+Shift+F9
Irina Eastwood said on June 25, 2010
Amazing! Very straight forward. Thanks guys! It worked
Suzym27 said on July 2, 2010
But how do I do this on a MAC?!?!
Suzym27 said on July 2, 2010
Figured it out!
Control + A to select all
Control + 6 to clear all hyperlinks
Fantastic!
Jhasgdas said on July 3, 2010
thank you very much bro…
Ambatirajaraviteja said on July 20, 2010
superrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Juicylicious said on July 27, 2010
Thank you Thank you Thank you Thank you Thank you Thank you Thank you Thank you!!!!!!!!!
Ajith Moharana said on July 29, 2010
super class coder – a lot of thanks
Clarkygal345 said on August 2, 2010
For word, press CTRL + A to select all, then press CTRL, Shift + F9.
Shortcut to get rid of all hyperlinks :)
Futbolamanda said on August 4, 2010
YAY you are SOOOOO helpful. Thanks heaps! Really, it is a revelation. I hated those hyperlinks!
Guest said on August 4, 2010
Click ‘file’ in Excel 2007??? Are you kidding me?
dotaplayer said on August 9, 2010
I love ya oh yes
Veb_405 said on August 11, 2010
this trick is so helpful to remove Hyperlinks with one click
that`s awosome!!!!!!
Liz said on August 13, 2010
This is awesome. You rule. Thanks.
mujnoo said on August 18, 2010
You are FABULOUS!!!
why is this solution not available in the Excel help????
thank you so much.
Powers_100 said on August 20, 2010
with this I am unable to remove hyperlinks of Java Script
Soanis said on August 20, 2010
For Office for Mac its cmd + 6 (that’s the command button near the spacebar + 6) when a text is selected.
Nana said on August 25, 2010
Thank you so much!
Bretv72 said on August 25, 2010
Oh thank you, thank you. I have a weekly document that I used to spend an hour on just removing copied hyperlinks!
S2c said on September 13, 2010
or you could select the text and press control+shift+f9
Prostreetphotography said on September 15, 2010
WHERE are the Tools > Macro > Macro tabs? I don’t see them in any menu at the top of my Word document. I copied everything above into a macro, but can’t seem to find any of the tabs I need to click on after that. Help! This sounds like such a great idea if I can figure it out.
Prostreetphotography said on September 15, 2010
OMG! Thanks, S2c! YOUR trick worked instantly! I’ll have to remember that one!
Harris David said on September 17, 2010
Wahhh…good dude..this is what i searched a lot…thx
D Arumugam said on September 22, 2010
thanks for your help
Vickythakre said on September 26, 2010
Many Many Thanks buddy
Jelena said on September 30, 2010
Many thanks from Jelena N, Belgrade, Serbia
Mrix2 said on October 4, 2010
Thank you very much!!
jeremey said on October 6, 2010
EXCELLENT! THANK YOU SO MUCH!
Dhas said on October 6, 2010
How about pressing CTRL+A then CTRL+SHIFT+F9?
R Andrew025 said on October 10, 2010
ThankS alot!
123 said on October 24, 2010
Good one
ASHRAJ2204 said on October 24, 2010
THANKX
Joe said on October 26, 2010
Thank You very much. It helps.
Shashank TM said on October 27, 2010
Thank you so much it helped me lot
nebo said on November 13, 2010
This works for MS Word for Mac – i.e. cmd+6. Thank you.
Leo said on November 17, 2010
Thanks, for a while i’ve been looking for something to remove hyperlinks in excel. I knew that CTRL+Shift+F9 removes them in word. Keep up the good work
Neeraj Tiwari said on November 19, 2010
there is no tools option in microsoft word 2010 .. i m stuck after copying the macro…please help….
Nemanie Dem said on December 26, 2010
Awesome! You saved my day)
Nemanie Dem said on December 26, 2010
Awesome! You saved my day)
Mav786110 said on December 29, 2010
amazing history project aced
V P said on December 31, 2010
outstading !!!!!!!!!!!!!!!!!!!!
Ceci said on January 13, 2011
same here! please!
Dilpreet Singh said on January 25, 2011
When i save the marco it works but is there any way it should remain saved in excel permanently…..whenever i open an excel file it should automatically be saved.
Linknumbernine said on January 28, 2011
you are an angel. I love you
Spooky said on February 19, 2011
Thanks dude! You saved me a lot of time so I didn’t have to remove every single hyperlink manually. I’m sue a lot of folks find this very helpful.
Guset said on April 1, 2011
Thanks! Very usefull.
Imtiaz said on April 6, 2011
thanks its working goood
machimocho said on April 28, 2011
excellent tip
Equinepedestrian said on May 2, 2011
This has proven to be very helpful!
Anonymous said on June 9, 2011
it works great …. but it doesn’t remove the links from images. Any ideas?
JJ said on June 13, 2011
I am also trying to remove links from images… :( not working, please help
Anonymous said on June 15, 2011
maybe save it in HTML and then remove the links then paste it into word again
Caidian Johnson said on October 26, 2011
… Thank you very much – Worked a treat! …
Akhtar Jahan said on November 7, 2011
Perfect. Thanks
Cindy said on November 16, 2011
THANK YOU – simple and fast.
SRILAKSHMI said on November 21, 2011
Thanks a lot. With this, I have removed all URL data within a few seconds in a very large excel file
Akhtar said on November 22, 2011
This article realy good.Special thanks to BentSpork. He solved my footnote hyperlink problem.
sunwukong said on November 22, 2011
I’m looking for a macro that will succesively find each hyperlink, copy that link and then place it in the document (after the linked text) as text.
Marvin said on December 2, 2011
Thank you so much! This is the greatest little gem I’ve found in a long time. At last, some real helpful help.
Paul said on December 28, 2011
Thanks – the other solutions online were not as quick or effective as this macro!
Libor said on January 10, 2012
Thanks! Smart solution.
John said on January 31, 2012
Many thanks – it’s excellent.