I have a table in a Word document.
I wanna write a parser in java to get the data in each field of the table.
But I found that it is difficult.
So I wonder if there is a way in vba to do this.
My intention is to get the data and write them in a xml file.
If it is difficult, writing to a text file is also acceptable.
Anyone have exp in this? Thanks.
Dim myrange As Range, i As Long, j As Long, mytable As Table
Set mytable = ActiveDocument.Tables(1)
For i = 1 To mytable.Rows.Count
For j = 1 To mytable.Columns.Count
Set myrange = mytable.Cell(i, j).Range
myrange.End = myrange.End - 1
'do what you want to with myrange which will now contain
'the contents of the cell.
Next j
Next i

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
>I have a table in a Word document.
> I wanna write a parser in java to get the data in each field of the table.
[quoted text clipped - 5 lines]
>
> Anyone have exp in this? Thanks.