B
Bob
I have a table in which the text of the first cell of each
row is to be hyperlinked.
I am having problems selecting the text in the cell.
Originally the whole cell was being selected, so I decided
to add the collapse method. It is successful in that it
actually selects text.
For i = 1 To ActiveDocument.Tables(1).Rows.count
With ActiveDocument.Tables(1).Cell(i, 1).Range
.Select
Selection.Collapse wdCollapseStart
Selection.Expand wdSentence - 1
ActiveDocument.Hyperlinks.Add
Anchor:=Selection.Range, _
Address:="http://. . . "
End With
Next istep
However, it doesn't select all the text in the cell. The
code shown above only selects the first word. If I try
Selection.Expand wdSentence
I get the whole cell. I've tried other wdunits without
success. Any suggestions?
row is to be hyperlinked.
I am having problems selecting the text in the cell.
Originally the whole cell was being selected, so I decided
to add the collapse method. It is successful in that it
actually selects text.
For i = 1 To ActiveDocument.Tables(1).Rows.count
With ActiveDocument.Tables(1).Cell(i, 1).Range
.Select
Selection.Collapse wdCollapseStart
Selection.Expand wdSentence - 1
ActiveDocument.Hyperlinks.Add
Anchor:=Selection.Range, _
Address:="http://. . . "
End With
Next istep
However, it doesn't select all the text in the cell. The
code shown above only selects the first word. If I try
Selection.Expand wdSentence
I get the whole cell. I've tried other wdunits without
success. Any suggestions?