4 Replies Latest reply on Jul 16, 2014 7:33 AM by Arnis Gubins

    How do you modify content of a table, but retain the table's UserString?


      I have a document containing structured table elements.  The tables contain user string information [used by the FDK for tracking purposes], but when I apply a simple script to modify the table shading, I then find the UserString no longer exists on the table.  [I checked this by comparing the MIF statements].

      My outline script is:

      doc = app.ActiveDoc

      tbl = doc.FirstTblInDoc

      tblfmt = doc.GetNamedTblFmt ("RouteTable")

      prop = tblfmt.GetProps()

      tbl.FirstRowInTbl ; cell = row1.FirstCellInRow ; cell.CellUseOverrideShading = true ; cell.CellOverrideShading = null ; cell.CellUseOverrideFill = true ; cell.CellOverrideFill = 3 ; // change the table

      tbl.SetProps (prop) // apply the changes

      According to the FrameMaker scripting guide, only Element and CombinedFontDefn objects can hold user strings.

      How can I modify the table [with table tag "RouteTable"] while retaining the Table's UserString?