Convert Paragraph To List Item In Google Docs Using Google App Script
How do you change a paragraph into a list item in Google Docs using Google App Script? To convert a paragraph into a list item using Google Docs identify first the paragraph you want to modify, then obtain the childIndex of where the paragraph is and finally insert the list item using insertListItem() function. Here’s how this process works going through step-by-step: Locate Paragraph To Change In your Google App Script code create a variable to capture the active document using DocumentApp.getActiveDocument() or open the document if you have the documentId using DocumentApp.openById(docId). ...