• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How to create a new Conditional Format?

New Here ,
Jun 26, 2017 Jun 26, 2017

Copy link to clipboard

Copied

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

TOPICS
Scripting

Views

261

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Mentor , Jun 27, 2017 Jun 27, 2017

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

Votes

Translate

Translate
Mentor ,
Jun 27, 2017 Jun 27, 2017

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines