MoveToTable Method

[Top]  [Chapter]  [Previous]  [Next]

Applies to



bool MoveToTable(string Name);



Moves to a table with a given name. The methods AddTable and InputTable allow it to give the table a name. If no table was found the result value will be false.


   if (TextCursor.MoveToTable("MYTABLE"))


      int val, sum = 0,i = 1;

      Random rnd = new Random();



         TextCursor.CPTableColNr = 0// First Cell



         val = rnd.Next(1000);





         if (!TextCursor.CPMoveNextRow(false)) break;




You may pass an empty string to locate the first table in the document. "{NESTEDTABLE}" will locate the first nested table in the current table cell. "{NEXTTABLE}" will locate the next table within the current nesting level. In case a table was found the cursor will be always moved into the first cell of the table.

Tip: You can use the methods ASetCellProp and ASetCellStyle to quickly modify the properties, text and styles of certain cells in an existing table.


To move to other named paragraphs use Memo.TextCommandStr(42, 0, name).

[idh_iwptextcursor_movetotable.htm]    Copyright © 2007 by WPCubed GmbH