First empty row in table

P

papou

Hi all
I am trying to find out how to programmatically reach the first empty row in
column 1 of a Word table.
Does anybody have a clue?
TIA

Cordially
Pascal
 
G

Greg

Maybe something like:

ub Test()
Dim oCol As Column
Dim oCell As Cell

Set oCol = Selection.Tables(1).Columns(1)

For Each oCell In oCol.Cells
If oCell.Range.Characters.Count = 1 Then
oCell.Select
Selection.Collapse
Exit For
End If
Next

End Sub
 
P

papou

Hi Greg
This works fine thank you.
I thought there may be some other way to do this without using a For Each
loop but obviously you can't?
Thank you again anyway
Cordially
Pascal
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top