On 22 Aug 2005 09:44:38 -0700, (e-mail address removed) wrote:
Hi Terrence,
modified example:
Dim s As String
s = ActiveDocument.Tables(1).Cell(1, 2).Range.Text
s = Left(s, Len(s) - 2)
And note the difference to Doug's example.
On the surface, more or less, where Doug's code operates,
the end-of-cell mark is one (!) character,
whereas if you put all of the cell's range text into a variable,
you have to cut off two (!) characters.
BTW there is a minor typo in Doug's code, as it happens.
Set myrange = ActiveDocument.Tables(n).Cells(i , j).Range ' no
Set myrange = ActiveDocument.Tables(n).Cell(i , j).Range ' yes
So you got two solutions. ;-)
Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"