Skip to main content
Known Participant
November 8, 2017
Answered

How to access TblFmt from a Tbl object?

  • November 8, 2017
  • 2 replies
  • 430 views

Is there any way to get a TblFmt from a selected Tbl which I can then use to set the TblFmt while creating a new Tbl from selected paragraphs? I am looking to convert a table to paragraphs, work on the paragraphs and then reconvert the paragraphs into a new table with the same format as previous table. I have a TextRange of selected paragraphs and am able to create a new Tbl using FCode KBD_TABLE_CONVERT but I want the new Tbl to have the same properties as the old Tbl.

This topic has been closed for replies.
Correct answer frameexpert

#target framemaker

var doc = app.ActiveDoc;

var tbl = doc.SelectedTbl;

var tblFmt = doc.GetNamedTblFmt (tbl.TblTag);

alert (tblFmt.ObjectValid ());

2 replies

frameexpert
Community Expert
frameexpertCommunity ExpertCorrect answer
Community Expert
November 8, 2017

#target framemaker

var doc = app.ActiveDoc;

var tbl = doc.SelectedTbl;

var tblFmt = doc.GetNamedTblFmt (tbl.TblTag);

alert (tblFmt.ObjectValid ());

www.frameexpert.com
Known Participant
November 8, 2017

thanks!