Copy link to clipboard
Copied
How to create a new Conditional Format Tag with default Style/Color/Background using ExtendScript?
1 Correct answer
Varun,
Very simple. If you have the document object:
var condFmt = doc.NewNamedCondFmt("SomeFormatName");
The new condition will have all "as-is" settings... that is, no color, style, etc. If you want to add style overrides, it is fairly simple. For example, to give the condition a red color and strikethrough text:
condFmt.SepOverride = doc.GetNamedColor ("Red");
condFmt.StyleOverride = Constants.FV_CN_STRIKETHROUGH;
This assumes that a color named "Red" exists in the document.
Russ
Copy link to clipboard
Copied
Varun,
Very simple. If you have the document object:
var condFmt = doc.NewNamedCondFmt("SomeFormatName");
The new condition will have all "as-is" settings... that is, no color, style, etc. If you want to add style overrides, it is fairly simple. For example, to give the condition a red color and strikethrough text:
condFmt.SepOverride = doc.GetNamedColor ("Red");
condFmt.StyleOverride = Constants.FV_CN_STRIKETHROUGH;
This assumes that a color named "Red" exists in the document.
Russ

