A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

deletion of hyperlinks



 
 
Thread Tools Display Modes
  #1  
Old August 10th, 2008, 04:41 AM posted to microsoft.public.word.newusers
Jay
external usenet poster
 
Posts: 704
Default deletion of hyperlinks

I'm using 2007 Office with Windows XP Pro.

I have a Word document spotted with many various hyperlinks. I know I can
individually remove them, but surely there is a faster way to remove them
from the document?
  #2  
Old August 10th, 2008, 09:27 AM posted to microsoft.public.word.newusers
Doug Robbins - Word MVP
external usenet poster
 
Posts: 8,239
Default deletion of hyperlinks

Use a macro containing the following code:

Dim i As Long
With ActiveDocument
For i = .Hyperlinks.Count To 1 Step -1
.Hyperlinks(i).Delete
Next i
End With


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"jay" wrote in message
...
I'm using 2007 Office with Windows XP Pro.

I have a Word document spotted with many various hyperlinks. I know I can
individually remove them, but surely there is a faster way to remove them
from the document?



  #3  
Old August 10th, 2008, 01:16 PM posted to microsoft.public.word.newusers
StevenM[_2_]
external usenet poster
 
Posts: 170
Default deletion of hyperlinks

To: Jay,

The following macro removes all hyperlinks in an active document, in
addition, it places the number of hyperlines to be removed in the status bar
along with the number left to be removed while it removes them. If you have
thousands of hyperlinks in a document, these numbers will give you a general
idea as to how long it will take to remove them all.

'
' Remove all hyperlinks
'
Sub RemoveHyperlinks()
Dim i As Long
Dim nLinks As Long

nLinks = ActiveDocument.Hyperlinks.Count
For i = nLinks To 1 Step -1
Application.StatusBar = nLinks & ":" & i
ActiveDocument.Hyperlinks(i).Delete
Next i
End Sub


Steven Craig Miller


"jay" wrote:

I'm using 2007 Office with Windows XP Pro.

I have a Word document spotted with many various hyperlinks. I know I can
individually remove them, but surely there is a faster way to remove them
from the document?

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:05 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.