(Tentative) function removeVerticalTabs() { var body = DocumentApp.getActiveDocument().getBody(); var bodyText = body.getText(); bodyText = bodyText.replace( /\r/g, "\n" ); body.setText( bodyText ); }