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

Script that changes all non-black colors to "Black"

Explorer ,
Apr 21, 2021 Apr 21, 2021

Copy link to clipboard

Copied

Hello,

 

I am working with several documents that are imported from MS Word (sometimes texts are colored) and I need to layout them in 1C Black so all other colors must be replaced with "Black".

 

I saw a thread [here] for removing specific colors and replacing them with a specific color but in my case, sometimes the colors are randomly named so I have to generalize it.

 

Here's the process I have in mind:

- If the script detects that a color name is not equal to "[Paper]" && "[Black]" && "[Registration]",

it will automatically remove that color and replace it with Black.

 

 I'm trying to write the code myself but it just won't work. Any help will be highly appreciated 🙂

TOPICS
Scripting

Views

345

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

Guru , Apr 21, 2021 Apr 21, 2021

Votes

Translate

Translate
Community Expert ,
Apr 21, 2021 Apr 21, 2021

Copy link to clipboard

Copied

Can you post the code that won't work?

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
Explorer ,
Apr 21, 2021 Apr 21, 2021

Copy link to clipboard

Copied

LATEST

Hi Brian, I just based my code on this post 

then tweaked it a little.

 

 

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
Guru ,
Apr 21, 2021 Apr 21, 2021

Copy link to clipboard

Copied

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
Explorer ,
Apr 21, 2021 Apr 21, 2021

Copy link to clipboard

Copied

A million thanks! I downloaded the script and it works totally how I need it to be. 

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