SubRange.getEndIndex() + ' Sub-range Content: ' + subRange.asString()) Ĭonsole.log('Failed with an error %s ', err.message) TextRange.getEndIndex() + ' Content: ' + textRange.asString()) Ĭonst subRange = textRange.getRange(0, 5) Ĭonsole.log('Sub-range Start: ' + subRange.getStartIndex() + ' Sub-range End: ' + Insert shape in the slide with dimensionsĬonst shape = slide.insertShape(_BOX, 100, 200, 300, 60) Ĭonsole.log('Start: ' + textRange.getStartIndex() + ' End: ' + Get the first slide of active presentationĬonst slide = SlidesApp.getActivePresentation().getSlides() It then retrieves a subrange that spans just the "Hello". The following script creates a text box on the first slide and sets its text content To retrieve a subrange from within a text range, use the getRange() function. To read the contents of a text range, use the asString() or A text range's start index is inclusive, and its end index These indexes using the getStartIndex() and getEndIndex() functions. Using text rangesĪ text range has two indexes that delimit the segment of textĬovered by a text range: the start index and end index. If you use methods that edit how text fits within a shape, any autofit settingsĪpplied to the shape are deactivated. Calling getText() on a shape or table cell returns a A TextRange represents a segment of text within a shape or You can edit and style text using text ranges, which are represented by the
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |