I have a big google doc file with over 100 pages(with tables etc) and there is some reference text in that document in multiple locations reference texts are highlighted with the color "grey", I want to have a function that can find those colors/style in the table or paragraph and delete it. So Step 1 is finding it, and then deleting(removing those texts from the document) it in one go.

How we did it in MS Word is, we created custom styles and assign those styles to those "Remarks Text"(in grey) and in VBA we look for text matching the style name, and if it returns true than we delete those texts. As much i know about doc, there is no option to create custom styles.

Here is the code I am trying:-

```
function removeText()
{
  var doc = DocumentApp.getActiveDocument()
  var body = doc.getBody()
  body.getParagraphs().map(r=> {
     if(r.getAttributes().BACKGROUND_COLOR === "#cccccc")
     {
        //Don't know what to do next, body.removeChild(r.getChild()) not working
     }
  })
}

```

Can you guide me on how I can achieve this effectively please.

Thanks