Copy link to clipboard
Copied
I'm trying to search for a character style in FrameMaker - not a character tag. Someone made certain text italic without properly tagging it with a character tag. Now I need to assign a tag to the text with a specific formatting. I know I can do it without a script but I do need a script solution because I need to generate a list of paragraphs which have italic text in them. This list is needed for something else. Here is what I have so far but it doesn't find the formatted text:
var doc=app.ActiveDoc
var docStart = doc.MainFlowInDoc;
var tloc = new TextLoc (docStart, 0);
// setup find parameters
findParams = AllocatePropVals(1);
findParams[0].propIdent.num = Constants.FS_FindCharFmt;
findParams[0].propVal.valType = Constants.FP_FontAngle;
findParams[0].propVal.ival = 5; //5 is int for Italic
var foundText = doc.Find(tloc, findParams);
Can someone point me in the right direction.
Thank you
Michael
Have something to add?