Enum TabType Stay organized with collections Save and categorize content based on your preferences.
Page Summary
TabType is an enumeration of all the tab types available in DocumentApp.
You can access TabType enum values by calling its parent class (DocumentApp), the enum name (TabType), and the property name.
The
getType()method can be used with a tab element to check its type against the TabType enumeration before casting.Currently, the only available TabType is
DOCUMENT_TAB.
An enumeration of all the tab types.
To call an enum, you call its parent class, name, and property. For example,DocumentApp.TabType.TAB.
Use theTab enumeration to check the type of a given element, for instance:
consttab=DocumentApp.getActiveDocument().getActiveTab();// Use getType() to determine the tab's type before casting.if(tab.getType()===DocumentApp.TabType.DOCUMENT_TAB){// It's a document tab, write some text to it.tab.asDocumentTab().setText('Hello World!');}else{// There are currently no types other than DOCUMENT_TAB.}
Properties
| Property | Type | Description |
|---|---|---|
DOCUMENT_TAB | Enum | The type corresponding toDocument. |
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.