vartab=DocumentApp.getActiveDocument().getActiveTab();//UsegetType()todeterminethetab'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{//TherearecurrentlynotypesotherthanDOCUMENT_TAB.}
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2024-08-20 UTC。"],[[["`TabType` is an enumeration used to identify different tab types within a Google Doc."],["Currently, `DOCUMENT_TAB` is the only available tab type, representing a document tab that can be interacted with using the `DocumentTab` class."],["You can determine the type of a tab using `getType()` and then perform actions based on its specific type, such as adding text to a `DOCUMENT_TAB`."]]],[]]