clear overrides keep tracking as it is
Hi Forum,
(Im trying to apply character styles through script and maintain overrides).
im pasting contents from word into indesign between the paragraph, keeping "All Information (Index, swatches etc) ticked on" in Clipboard Handling in General Perferences Settings, to maintain bold and italics as is in the word document.
Im replacing the bold, italic - fontStyle applied in word doc, and applying bold & italic character style created through Script.
It seems that the fontFamily still remains unchanged and the paragraphStyle with overrides..
I also cleared the overrides using.
app.selection[0].clearOverrides();
unfortunately it seems, that the manual "trackings applied to that paragraph is also resetted.
How could i apply fontFamily of the pasted contents, without clearing overrides...
var myDoc = app.activeDocument;
if (myDoc.characterStyles.item("Bold") == null) {
var myCharStyle = myDoc.characterStyles.add({name:"Bold"});
}
app.findTextPreferences.fontStyle = "Bold"
app.changeTextPreferences.appliedCharacterStyle = "Bold"
app.changeText();
app.selection[0].clearOverrides();
thanks & regards,
Shil..