'In Google Slides, trying to set AutofitType to 'Shrink text on overflow' ('TEXT_AUTOFIT')
I have tried the following code but discovered that although the AutofitTypes are enumerated, only "NONE" works.
requests = [(
{ updateShapeProperties: {
objectId: shape.getObjectId(),
shapeProperties: {
autofit: {
autofitType: "NONE" // vs. "TEXT_AUTOFIT"
}
},
fields: "autofit.autofitType"
}
}
)]
response = Slides.Presentations.batchUpdate({requests: requests}, deck.getId());
So I changed my logic and created the TEXT_BOX in Slides with the desired AutofitType. To my chagrin, when I issued my first shape.getText().replaceAllText('text placeholder','new text'), the Autofit option has been reset to NONE.
Any thoughts on how I can script the setting of AutofitType?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
