• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How to search for a character style (not tag) in FrameMaker with javascript?

Participant ,
Feb 06, 2020 Feb 06, 2020

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

TOPICS
Formatting and numbering , Scripting

Views

230

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
community guidelines
no replies

Have something to add?

Join the conversation