lnstart=oWord.Selection.start lnend=oWord.Selection.end llfound=.f. WITH oWord.ActiveDocument *find table FOR it=1 TO .Tables.count IF .Tables(it).Range.End >= lnend llfound= (.Tables(it).Range.Start<= lnStart) exit ENDIF ENDFOR ENDWITH IF llfound *Find Row WITH oWord.ActiveDocument.Tables(it) FOR ir=1 TO .Rows.Count IF .rows(ir).range.end >= lnend EXIT endif ENDFOR ENDWITH *Find Column WITH oWord.ActiveDocument.Tables(it).rows(ir) FOR ic=1 TO .Cells.Count IF .cells(ic).range.end >= lnend EXIT endif ENDFOR ENDWITH ?"Table #",TRANSFORM(it),", Row #",TRANSFORM(ir), ", Cell #",TRANSFORM(ic) ELSE ?"not in the table" ENDIF>Hi:
>oWord = CreateObject("Word.Application") >oWord.Visible = .t. >oDocument = oWord.Documents.Add() >CopyTable = oDocument.Tables.Add(oRange ,oRow, oColNum, wdWord9TableBehavior, wdAutoFitContent) >>
>CopyTable.Cell(1,3).Select >>
>CopyTable.Cell(1,1).Select >>