Quantcast
Channel: Adobe Community: Message List - FrameMaker Scripting
Viewing all articles
Browse latest Browse all 3715

Re: iterate all tables in framemaker

$
0
0

Well, if the script is going to go through all the table contents, it is the right approach.

The step that is missing is the inner loop, going through the paragraphs in each cell:

 

doc = app.ActiveDoc;

table = doc.FirstTblInDoc ;

row = table.FirstRowInTbl;

while(table.ObjectValid()){

    while (row.ObjectValid()) { //traverse rows

        cell = row.FirstCellInRow;

        while (cell.ObjectValid()) { //traverse cells in row

            pgf = cell.FirstPgf;

            while( pgf.ObjectValid()) {

                    // this is where you can put code to get text, or text properties from the paragraph.

               }

               pgf = pgf.NextPgInFlow;

          }

            cell = cell.NextCellInRow;

        }

        row = row.NextRowInTbl;

    }

     table =table.NextTblInDoc;

}


Viewing all articles
Browse latest Browse all 3715

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>