1 Reply Latest reply on Jun 27, 2017 5:27 AM by Russ Ward

    How to create a new Conditional Format?

    varuns44789478 Level 1

      How to create a new Conditional Format Tag with default Style/Color/Background using ExtendScript?

        • 1. Re: How to create a new Conditional Format?
          Russ Ward Level 4

          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