Retrieve the ListItem index in Google Doc

246 Views Asked by At

In Google Apps Script (Google Document), when a ListItem is set to DocumentApp.GlyphType.NUMBER, how can I retrieve the ListItem number?

Note: The ListItem objects may not be consecutives, and they may not have the same parent.

Context:

Google Doc has the ability to create numbered lists starting at any index:

  • Type "3."
  • Press space

--> a new list starting with 3 will be created.

I need to retrieve that number in code.

1

There are 1 best solutions below

1
On BEST ANSWER

There is currently no way to find out this information. Please file an enhancement request for this feature at the Apps Script issue tracker.