View Single Post
 
Old 10-11-2015, 01:20 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit 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

Quote:
Originally Posted by dougie1809 View Post
Thank you for your reply. The cells do not contain the same text, they contain different PDF file names.
If you want help solving a problem, you should avoid providing misleading information. While you now say the cells don't contain the same text, the table in your attachment does contain the same text in every cell in column 2.

Hopefully, you have now correctly stated your requirements, for which you could use a macro like:
Code:
Sub Demo()
Dim Rng As Range, TblCell As Cell, StrTxt As String
With Selection
  If .Information(wdWithInTable) = False Then Exit Sub
  For Each TblCell In .Cells
    Set Rng = TblCell.Range
    With Rng
      .End = .End - 1
      StrTxt = .Text
      .Text = ""
    End With
    ActiveDocument.Hyperlinks.Add Anchor:=Rng, _
      Address:="Address", SubAddress:="SubAddress", _
      ScreenTip:="", TextToDisplay:=StrTxt, Target:="_blank"
  Next
End With
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote