Thanks Helmut - How do I then refer to the cells within this last row?
Alternatively - what method do I use to return /determine the last row of a
table?
> Hi,
>
[quoted text clipped - 6 lines]
> "red.sys" & chr(64) & "t-online.de"
> Word 2002, Windows 2000
Helmut Weber - 16 Aug 2005 10:37 GMT
Hi,
just one of some ways:
With ActiveDocument.Tables(3).Rows.Last
MsgBox Len(.Cells(2).Range.Text)
End With
I hope, the use of "activedocument" doesn't confuse you.
You have do adapt the code to work from Excel.
An note that ...cells(2).range.text contains
not only the text in that cell, but the two
characters, that make up the end-of-cell mark,
in addition.
Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
"red.sys" & chr(64) & "t-online.de"
Word 2002, Windows 2000
Andibevan - 16 Aug 2005 10:52 GMT
Thanks Helmut - I have used vba in excel loads but never had a requirement
within Word before. Do you know if the Rows.Last method works when
controlling word from within excel?
> Hi,
>
[quoted text clipped - 16 lines]
> "red.sys" & chr(64) & "t-online.de"
> Word 2002, Windows 2000
JBNewsGroup - 16 Aug 2005 10:51 GMT
Hi Andibevan,
The last row would be the number of rows:
ActiveDocument.Tables(1).Rows.Count
You could then set a Range to that row.
Jerry Bodoff
> Thanks Helmut - How do I then refer to the cells within this last row?
>
[quoted text clipped - 11 lines]
> > "red.sys" & chr(64) & "t-online.de"
> > Word 2002, Windows 2000
Doug Robbins - 16 Aug 2005 18:11 GMT
Dim newrow as Row
Set newrow = ActiveDocument.Tables(1).Rows.Add
newrow now can be used to refer to the row that you just added.

Signature
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
> Thanks Helmut - How do I then refer to the cells within this last row?
>
[quoted text clipped - 12 lines]
>> "red.sys" & chr(64) & "t-online.de"
>> Word 2002, Windows 2000