Skip to main content

Format bullet points

Applies consistent formatting to bullet points.

(function () {
let presentation = Api.GetPresentation();
let slideCount = presentation.GetSlidesCount();
let bullet = Api.CreateBullet("-");

for (let i = 0; i < slideCount; i++) {
let slide = presentation.GetSlideByIndex(i);
let shapes = slide.GetAllShapes();

shapes.forEach(function (shape) {
let docContent = shape.GetDocContent();
let paragraphs = docContent.GetAllParagraphs();
paragraphs.forEach(function (paragraph) {
let paragraphProperties = paragraph.GetParaPr();
let indentLeft = paragraphProperties.GetIndLeft();

if (indentLeft !== 0) {
paragraph.SetBullet(bullet);
paragraph.SetHighlight("white");
}
});
});
}
})();

Methods used: GetPresentation, GetSlidesCount, CreateBullet, GetSlideByIndex, GetAllShapes, GetDocContent, GetParaPr, GetIndLeft, SetBullet, SetHighlight

Result

BulletPointFormatter BulletPointFormatter