• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Bullet and numbering

New Here ,
Nov 17, 2017 Nov 17, 2017

Copy link to clipboard

Copied

I want to have numbering list like that =

Adsız.png

How can I do it?

TOPICS
Scripting

Views

274

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Nov 19, 2017 Nov 19, 2017

Copy link to clipboard

Copied

LATEST

This might get you started:

var t=app.selection[0]; // or any text object

t.bulletsAndNumberingListType = ListType.NUMBERED_LIST;

t.numberingFormat = "I, II, III, IV..."; // in other words, roman numerals

t.numberingExpression = "^#.^t"; // iow: the number is followed by a period and a tab

You then need to set a tab stop to get the spacing you want between the roman numeral and rest of the text.

There other "numbering" parameters you might want to look at:

But my instinct would be to create a paragraph style with the "Bullets and Numbering" properties set up to produce your desired look. Then your script simply has to apply that paragraph style where needed. The point being that it might be easier to tweak the paragraph style than to open up the script every time you need to make the tab bigger or smaller.

Bob

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines