Skip to main content

SetTableBorderAll

Specifies a border which will be displayed on all table cell borders.

Syntax​

expression.SetTableBorderAll(type, size, fill);

expression - A variable that represents an ApiTablePr class.

Parameters​

NameRequired/OptionalData typeDefaultDescription
typeRequiredBorderTypeThe border style.
sizeRequiredmmThe width of the current border.
fillRequiredApiFillThe color or pattern used to fill the current border.

Returns​

boolean

Example​

Set all the table borders at once through the table properties in a presentation.

// The same border is applied to the outer edges and to the inner separators.

// Draw a uniform dark gray grid for the whole table.

const presentation = Api.GetPresentation();
const slide = presentation.GetSlideByIndex(0);
const table = Api.CreateTable(3, 3);
const style = presentation.GetStyle("No Style, Table Grid");
table.SetStyle(style);
const tablePr = style.GetTablePr();
tablePr.SetTableBorderAll("single", 2, Api.CreateSolidFill(Api.RGB(51, 51, 51)));
style.SetTablePr(tablePr);
slide.RemoveAllObjects();
slide.AddObject(table);