Skip to main content
ibrahimd67324582
Known Participant
November 18, 2017
Question

Bullet and numbering

  • November 18, 2017
  • 1 reply
  • 309 views

I want to have numbering list like that =

How can I do it?

This topic has been closed for replies.

1 reply

Inspiring
November 20, 2017

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