Back

If your email is not recognized and you believe it should be, please contact us.

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • in reply to: JS to delete old style and replacing it wih new one. #102387
    Mary Posner
    Member

    I second Colin’s suggestion to do this with a for-loop, although I did also test a sample of what you have (also on a Mac) and it worked for me as well.

    I’d set up two arrays, one with the names of the old styles you’re looking to replace, one with the new ones you want to replace them with, and then loop through the items in those arrays. Wrap the “old.remove(new);” line in a try/catch in case one of the styles isn’t present in the document. However, keep in mind that if an old style is present in the document, but the corresponding new one isn’t, it will of course fail to change it.

Viewing 1 post (of 1 total)