在 Google 文档中检索 ListItem 索引

Retrieve the ListItem index in Google Doc

本文关键字:ListItem 索引 检索 Google 文档      更新时间:2023-09-26

在Google Apps Script(Google Document)中,当ListItem设置为DocumentApp.GlyphType.NUMBER时,如何检索ListItem编号?

ListItem对象可能不是连续的,并且它们可能没有相同的父对象。

上下文:

Google Doc 能够创建从任何索引开始的编号列表:

  • 键入"3"。
  • 新闻空间
-

->将创建一个以 3 开头的新列表。

我需要在代码中检索该号码。

目前没有办法找到这些信息。请在应用程序脚本问题跟踪器上提交此功能的增强请求。