// Create a named range that includes every table in the active tab.constdocumentTab=DocumentApp.getActiveDocument().getActiveTab().asDocumentTab();constrangeBuilder=documentTab.newRange();consttables=documentTab.getBody().getTables();for(leti=0;i < tables.length;i++){rangeBuilder.addElement(tables[i]);}documentTab.addNamedRange('myUniquePrefix-tables',rangeBuilder.build());
[[["เข้าใจง่าย","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-12-22 UTC"],[[["A `NamedRange` is a named area within a Google Doc tab, retrievable using its name or unique ID, similar to HTML elements with classes and IDs respectively."],["While multiple ranges can share the same name, IDs are unique within a tab, and once a `NamedRange` is added, it can only be removed, not modified."],["`NamedRange` provides methods like `getId()`, `getName()`, `getRange()`, and `remove()` for managing and accessing the named range and its associated elements."],["Scripts can access `NamedRange` within a tab, and using unique prefixes for range names helps avoid conflicts between different scripts."],["`NamedRange` methods might require specific authorization scopes for accessing and manipulating document content."]]],[]]