Quantcast
Channel: Adobe Community: Message List - FrameMaker Scripting
Viewing all articles
Browse latest Browse all 3715

Re: Remove Character Format Override From Text Range

$
0
0

Marc,

 

If you simply want to remore all overrides (i.e. not change the current overrides to existing formats), there is a much simpler and faster method. To explain this, you need to know about the Import Formats function. Please open the command File > Import > Formats and look at the dialog. Select all the formats you want to remove the overrides for and select the option for "While Updating, Remove: Other Formats/Layout Overrides". The listbox "Import from Document" shows the current document by default, which is what you want to do. This effectively removes overrides without doing anything else (as the formats are overwritten by the formats from the same document, which changes nothing to them).

 

Translated into ExtendScript code, this is what it looks like:

 

var oDoc = app.ActiveDoc;

oDoc.SimpleImportFormats ( oDoc, Constants.FF_UFF_FONT | Constants.FF_UFF_REMOVE_EXCEPTIONS );

 

If you also want to remove paragraph format overrides, add Constants.FF_UFF_PGF. Make sure to use a single pipe ( | ) symbol to create a bitwise OR on the constants, as using a double pipe ( || ) is a logical OR and will leave you stunned.

 

Kind regards

 

Jang


Viewing all articles
Browse latest Browse all 3715

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>