Class AutoText

  • AutoText is a dynamic text element that changes over time, like a slide number.

  • ThegetAutoTextType() method returns the type of auto text.

  • ThegetIndex() method returns the index of the auto text.

  • ThegetRange() method returns aTextRange spanning the auto text.

  • These methods require specific authorization scopes.

AutoText

An element of text that is dynamically replaced with content that can change over time, such as aslide number.

Methods

MethodReturn typeBrief description
getAutoTextType()AutoTextType|nullReturns the type of auto text.
getIndex()Integer|nullReturns the index of the auto text.
getRange()TextRange|nullReturns aTextRange spanning the auto text.

Detailed documentation

getAutoTextType()

Returns the type of auto text. Returnsnull if the auto text has been deleted.

Return

AutoTextType|null

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

getIndex()

Returns the index of the auto text. Returnsnull if the auto text has been deleted.

Return

Integer|null

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

getRange()

Returns aTextRange spanning the auto text. Returnsnull if the auto text hasbeen deleted.

Return

TextRange|null

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-11 UTC.