Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-09-2013, 07:20 AM
RobDavis RobDavis is offline Remove Hyperlink Windows 7 64bit Remove Hyperlink Office 2010 64bit
Novice
Remove Hyperlink
 
Join Date: Dec 2013
Posts: 5
RobDavis is on a distinguished road
Thumbs up Remove Hyperlink

Hi Experts,



I want to remove Hyperlink from my word file but i want to remove hyperlink from only those WORDS which has start from "@" or "#"signs.

Your kind support is required in this regard. Thank you.


Regards \\ Rob
Reply With Quote
  #2  
Old 12-09-2013, 03:34 PM
macropod's Avatar
macropod macropod is offline Remove Hyperlink Windows 7 32bit Remove Hyperlink Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

You cannot remove the hyperlink from part of a hyperlink - it's an all-or-nothing affair. Perhaps you could provide more detail. And can you attach a document to a post with some representative hyperlinks showing what you want to keep as hyperlinks and what you want to convert (delete anything sensitive)? You do this via the paperclip symbol on the 'Go Advanced' tab.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 12-09-2013, 03:45 PM
RobDavis RobDavis is offline Remove Hyperlink Windows 7 64bit Remove Hyperlink Office 2010 64bit
Novice
Remove Hyperlink
 
Join Date: Dec 2013
Posts: 5
RobDavis is on a distinguished road
Thumbs down

Quote:
Originally Posted by macropod View Post
You cannot remove the hyperlink from part of a hyperlink - it's an all-or-nothing affair. Perhaps you could provide more detail. And can you attach a document to a post with some representative hyperlinks showing what you want to keep as hyperlinks and what you want to convert (delete anything sensitive)? You do this via the paperclip symbol on the 'Go Advanced' tab.
Thank you for your reply. Actually It's Tweeter Tweet.

If we copy that to word then Twitter ID and #Hastag are also having Hyperlinks with webpage or pictures URL whereas i wanna save only Picture Urls therefore its making hurdel to me.
Reply With Quote
  #4  
Old 12-09-2013, 04:29 PM
macropod's Avatar
macropod macropod is offline Remove Hyperlink Windows 7 32bit Remove Hyperlink Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

I don't use Twitter, so I don't really know what it is you're working with - hence the need for a document containing some sample hyperlinks.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 12-09-2013, 04:38 PM
RobDavis RobDavis is offline Remove Hyperlink Windows 7 64bit Remove Hyperlink Office 2010 64bit
Novice
Remove Hyperlink
 
Join Date: Dec 2013
Posts: 5
RobDavis is on a distinguished road
Thumbs down Sample File

Please PFA sample file for which i wanna remove hyperlink if any word starts with "@" or "#" sign
Attached Files
File Type: docx SampleFile.docx (17.0 KB, 10 views)
Reply With Quote
  #6  
Old 12-09-2013, 04:53 PM
macropod's Avatar
macropod macropod is offline Remove Hyperlink Windows 7 32bit Remove Hyperlink Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

OK, the hyperlinks with the @ and # actually separate hyperlinks. You can see that if you press Alt-F9 to toggle the hyperlink field code display on/off. So you want to delete them entirely, or retain the words in a non-hyperlink format?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #7  
Old 12-09-2013, 04:57 PM
RobDavis RobDavis is offline Remove Hyperlink Windows 7 64bit Remove Hyperlink Office 2010 64bit
Novice
Remove Hyperlink
 
Join Date: Dec 2013
Posts: 5
RobDavis is on a distinguished road
Default

I want to retain the word but only needs to delete hyperlinks of all those words which starts from "@" or "#" sign. Thank you .
Reply With Quote
  #8  
Old 12-09-2013, 05:43 PM
macropod's Avatar
macropod macropod is offline Remove Hyperlink Windows 7 32bit Remove Hyperlink Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Try the following macro:
Code:
Sub Demo()
Dim i As Long, StrTxt As String, StrOut As String
With ActiveDocument
  For i = .Hyperlinks.Count To 1 Step -1
    With .Hyperlinks(i)
      StrTxt = .TextToDisplay
      If StrTxt Like "[#@]*" Then
        .Range.Fields(1).Unlink
      ElseIf InStr(StrTxt, "@") > 0 Then
        StrOut = Mid(StrTxt, InStr(StrTxt, "@") - 1, Len(StrTxt))
        .Range.InsertAfter StrOut
        .TextToDisplay = Left(StrTxt, InStr(StrTxt, "@") - 2)
      End If
    End With
  Next
End With
End Sub
Note: some/most of the @ symbols were actually within a hyperlink rather than being its start, so that added an extra level of complication to the code
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #9  
Old 12-09-2013, 05:51 PM
RobDavis RobDavis is offline Remove Hyperlink Windows 7 64bit Remove Hyperlink Office 2010 64bit
Novice
Remove Hyperlink
 
Join Date: Dec 2013
Posts: 5
RobDavis is on a distinguished road
Default

Ya. I tried and it worked at my end same as required. Thank you so much. #Feeling very happy. you saved my too many hours. Thank youuuuuuuuuuuuuuuuuu
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove Hyperlink Remove Red macro netchie Word VBA 5 03-15-2013 04:22 PM
Remove Hyperlink Insert the Hyperlink and hide all sheets except clicking Hyperlink PRADEEPB270 Excel 1 02-22-2013 09:47 AM
Remove Hyperlink How to remove "Table of Figures" as we do to remove the "Table of Contents"? Jamal NUMAN Word 1 07-08-2011 05:40 PM
Remove Hyperlink How do I remove the gap in my header? losty. Word 2 10-05-2010 01:21 AM
How to remove the UNDERLINE from a hyperlink text? Learner7 PowerPoint 3 05-17-2010 09:35 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:34 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft