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

Trying to replace and delete cell style...but it's not working

Community Beginner ,
Jul 31, 2018 Jul 31, 2018

Copy link to clipboard

Copied

Hi.

I've been using the following code to delete paragraph and character styles, but when I've tried it on cell styles it just isn't working:

var myDoc = app.activeDocument; 

try{

myDoc.cellStyles.item("Cell Style 1").remove("Cell Style 2");

}catch(e){}

Can anyone point me in the right direction?

Thanks

TOPICS
Scripting

Views

411

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

Community Beginner , Aug 01, 2018 Aug 01, 2018

The answer from Michel [FRIdNGE] was:

myDoc.cellStyles.item("Cell Style 1").remove(myDoc.cellStyles.item("Cell Style 2"));

Votes

Translate

Translate
People's Champ ,
Aug 01, 2018 Aug 01, 2018

Copy link to clipboard

Copied

Sorry for the removal. Bad manipulation. Seeing how to restore.

Michel [FRIdNGE]​ May I invite you to offer your solution again so I can validate it as correct again ?

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
Community Beginner ,
Aug 01, 2018 Aug 01, 2018

Copy link to clipboard

Copied

The answer from Michel [FRIdNGE] was:

myDoc.cellStyles.item("Cell Style 1").remove(myDoc.cellStyles.item("Cell Style 2"));

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
People's Champ ,
Aug 01, 2018 Aug 01, 2018

Copy link to clipboard

Copied

LATEST

Yes but I hope he can get in so we can attribute its points back

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