Highlighted

view current cell; if cell overflows

Explorer ,
Jul 21, 2020

Copy link to clipboard

Copied

var doc, tbl, row, cell;

 

doc = app.ActiveDoc;

tbl = doc.FirstTblInDoc;

while (tbl.ObjectValid ()) {

    row = tbl.FirstRowInTbl;

    while (row.ObjectValid ()) {

        cell = row.FirstCellInRow;

        while (cell.ObjectValid ()) {

            if (cell.Overflowed === 1) {

                alert ("Cell overflowed");

            }

            cell = cell.NextCellInRow;

        }

        row = row.NextRowInTbl;

    }

    tbl = tbl.NextTblInDoc;

}

 

 

 

am using the above code from this thread https://community.adobe.com/t5/framemaker/finding-cell-overflow-in-table-problem-with-script/m-p/112...

 

can anyone help to take the script to the row/cell/page where the overflow takes place?

  if (cell.Overflowed === 1) 
            {
            var tLocBeg = new TextLoc(cell.FirstPgf,0);
            var tLocEnd = new TextLoc(cell.FirstPgf,Constants.FV_OBJ_END_OFFSET);
            var tRange = new TextRange(tLocBeg,tLocEnd);
            doc.ScrollToText(tRange);

            }

Views

35

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

view current cell; if cell overflows

Explorer ,
Jul 21, 2020

Copy link to clipboard

Copied

var doc, tbl, row, cell;

 

doc = app.ActiveDoc;

tbl = doc.FirstTblInDoc;

while (tbl.ObjectValid ()) {

    row = tbl.FirstRowInTbl;

    while (row.ObjectValid ()) {

        cell = row.FirstCellInRow;

        while (cell.ObjectValid ()) {

            if (cell.Overflowed === 1) {

                alert ("Cell overflowed");

            }

            cell = cell.NextCellInRow;

        }

        row = row.NextRowInTbl;

    }

    tbl = tbl.NextTblInDoc;

}

 

 

 

am using the above code from this thread https://community.adobe.com/t5/framemaker/finding-cell-overflow-in-table-problem-with-script/m-p/112...

 

can anyone help to take the script to the row/cell/page where the overflow takes place?

  if (cell.Overflowed === 1) 
            {
            var tLocBeg = new TextLoc(cell.FirstPgf,0);
            var tLocEnd = new TextLoc(cell.FirstPgf,Constants.FV_OBJ_END_OFFSET);
            var tRange = new TextRange(tLocBeg,tLocEnd);
            doc.ScrollToText(tRange);

            }

Views

36

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jul 21, 2020 0
Enthusiast ,
Jul 22, 2020

Copy link to clipboard

Copied

  if (cell.Overflowed === 1) 
            {
            var tLocBeg = new TextLoc(cell.FirstPgf,0);
            var tLocEnd = new TextLoc(cell.FirstPgf,Constants.FV_OBJ_END_OFFSET);
            var tRange = new TextRange(tLocBeg,tLocEnd);
            doc.ScrollToText(tRange);

            }

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 22, 2020 0
Explorer ,
Jul 22, 2020

Copy link to clipboard

Copied

Much appriceated. Thanks a ton.

although it stops at the first instance of the overflow. But i guess that is ok, if i work on the cell one by one, the code still works.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 22, 2020 0