Utility to Highlight All Occurrences of a Word in a FrameMaker Document


Hello Framers,

In this blog post, I am going to describe “Highlight all occurrences of a word” – a very commonly used text-editing feature, internally developed using FDK (Frame Development Kit) and FrameMaker’s conditional text feature.
This will help for fast visualization of a specific word used throughout the document. Sometimes using FrameMaker’s native Find & Replace utility doesn’t help as one has to do multiple clicks. This can save you the trouble of manually cycling through the document.


Once the client is registered in FrameMaker, it will be available in all documents. Whenever you select any word, all occurrences of that word are highlighted in the document in green.

  • It works on FM documents, mif and xml files
  • It works only on single words, with no whitespaces in between.


  • Add the following entry (all in one line) to the [APIClients] section of your  maker.ini  file:
    HighlightAll=Standard, Select all occurrences of selected word, <path of downloaded dll>\Highlight.dll, all
  • Open any document and select a word – you will see all its occurrences highlighted

Technical Details

Here is a small gist of the way the client works (attached here):

  • When any word is selected, a new temporary conditional tag is created with background color property set to Green.
  • F_ApiFind is used to find the word
  • The tag is applied to each occurrence found
  • Whenever text selection is changed (through single click or selecting another word) the temporary tag is deleted and hence the word is un-highlighted.
  • Before saving the doc too, the tag is deleted so that no changes are saved in the document.
  • Getting changes in text selection is done through the use of FA_Note_PostMouseCommand notifications

I have attached the source code for further details.

NOTE: This utility will work only in FrameMaker 11 because some enhancements made in conditional text feature have been used.

Do try the utility and let us know your valuable feedback!


Anchal Arora, Sr Software Engineer, Adobe FrameMaker Engineering Team

FrameMaker, Products

Posted on 10-25-2012


  • By Arnis Gubins - 4:56 PM on October 25, 2012   Reply

    It would be quite beneficial (education wise) if you could provide an ExtendScript version of this utility. Users could then more easily adapt this example to change the colors and play with the search strings.

Join the discussion