+ Reply to Thread
Results 1 to 3 of 3

Remove Hyperlinks...show the Path

  1. #1
    BenJAMMIN
    Guest

    Remove Hyperlinks...show the Path


    If you would like to permanently display the path in the
    cell (i.e. replace microsoft with www.microsoft.com), right click on the
    cell, and use edit hyperlinks. The top pane shows the display name, the
    bottom pane shows the path. Copy the path to the display name. I am not
    sure if there is a quick way to do this. NOTE: You will have to use keyboard
    commands to copy and paste.

    This solution works, but it is one by one. Does anyone k now of a mass
    change method? I want to take a hyperlinked word (web address or email
    address) and have it display the hyperlink properties instead of the word.

  2. #2
    Jim Rech
    Guest

    Re: Remove Hyperlinks...show the Path

    If you just want to change the text displayed in the cell:

    Dim Cell As Range
    For Each Cell In Selection
    Cell.Value = "www." & Cell.Value & ".com"
    Next


    --
    Jim
    "BenJAMMIN" <[email protected]> wrote in message
    news:[email protected]...
    |
    | If you would like to permanently display the path in the
    | cell (i.e. replace microsoft with www.microsoft.com), right click on the
    | cell, and use edit hyperlinks. The top pane shows the display name, the
    | bottom pane shows the path. Copy the path to the display name. I am not
    | sure if there is a quick way to do this. NOTE: You will have to use
    keyboard
    | commands to copy and paste.
    |
    | This solution works, but it is one by one. Does anyone k now of a mass
    | change method? I want to take a hyperlinked word (web address or email
    | address) and have it display the hyperlink properties instead of the word.



  3. #3
    Dave Peterson
    Guest

    Re: Remove Hyperlinks...show the Path

    This might get you started:

    Option Explicit
    Sub testme()

    Dim myHyperlink As Hyperlink
    Dim wks As Worksheet

    Set wks = ActiveSheet

    For Each myHyperlink In wks.Hyperlinks
    myHyperlink.Parent.Value = myHyperlink.Address
    Next myHyperlink

    End Sub

    But my tests returned:
    http://www.microsoft.com/

    If that's a problem, you could eliminate the http:// and trailing slash if you
    want.

    Option Explicit
    Sub testme()

    Dim myHyperlink As Hyperlink
    Dim wks As Worksheet
    Dim myStr As String
    Dim SlashPos As Long

    Set wks = ActiveSheet

    For Each myHyperlink In wks.Hyperlinks
    myStr = myHyperlink.Address
    SlashPos = InStr(1, myStr, "//")
    If SlashPos > 0 Then
    myStr = Mid(myStr, SlashPos + 2)
    End If
    If LCase(Left(myStr, 7)) = "mailto:" Then
    myStr = Mid(myStr, 8)
    End If
    If Right(myStr, 1) = "/" Then
    myStr = Left(myStr, Len(myStr) - 1)
    End If
    myHyperlink.Parent.Value = myStr
    Next myHyperlink

    End Sub


    BenJAMMIN wrote:
    >
    > If you would like to permanently display the path in the
    > cell (i.e. replace microsoft with www.microsoft.com), right click on the
    > cell, and use edit hyperlinks. The top pane shows the display name, the
    > bottom pane shows the path. Copy the path to the display name. I am not
    > sure if there is a quick way to do this. NOTE: You will have to use keyboard
    > commands to copy and paste.
    >
    > This solution works, but it is one by one. Does anyone k now of a mass
    > change method? I want to take a hyperlinked word (web address or email
    > address) and have it display the hyperlink properties instead of the word.


    --

    Dave Peterson

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1