Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

PowerPoint.BorderProperties interface

Package:
powerpoint

Represents the properties for a table cell border.

Remarks

API set: PowerPointApi 1.8

Used by

Examples

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/powerpoint/shapes/add-modify-tables.yaml

// Specifies a table's borders.
await PowerPoint.run(async (context) => {
 const shapes = context.presentation.getSelectedSlides().getItemAt(0).shapes;

 // Add a table, specifying border styles.
 shapes.addTable(3, 4, {
 values: [
 ["A", "BB", "CCC", "DDDD"],
 ["E", "FF", "GGG", "HHHH"],
 ["1", "12", "123", "1234"]
 ],
 uniformCellProperties: {
 borders: {
 left: { color: "blue", dashStyle: PowerPoint.ShapeLineDashStyle.solid, weight: 4 },
 right: { color: "blue", dashStyle: PowerPoint.ShapeLineDashStyle.solid, weight: 4 },
 top: { color: "red", dashStyle: PowerPoint.ShapeLineDashStyle.longDashDotDot, weight: 2 },
 bottom: { color: "red", dashStyle: PowerPoint.ShapeLineDashStyle.longDashDotDot, weight: 2 }
 }
 }
 });
 await context.sync();
});

Properties

color

Represents the line color in the hexadecimal format #RRGGBB (e.g., "FFA500") or as a named HTML color value (e.g., "orange").

dashStyle

Represents the dash style of the line.

transparency

Specifies the transparency percentage of the line as a value from 0.0 (opaque) through 1.0 (clear).

weight

Represents the weight of the line, in points.

Property Details

color

Represents the line color in the hexadecimal format #RRGGBB (e.g., "FFA500") or as a named HTML color value (e.g., "orange").

color?: string | undefined;

Property Value

string | undefined

Remarks

API set: PowerPointApi 1.8

Examples

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/powerpoint/shapes/add-modify-tables.yaml

// Specifies a table's borders.
await PowerPoint.run(async (context) => {
 const shapes = context.presentation.getSelectedSlides().getItemAt(0).shapes;

 // Add a table, specifying border styles.
 shapes.addTable(3, 4, {
 values: [
 ["A", "BB", "CCC", "DDDD"],
 ["E", "FF", "GGG", "HHHH"],
 ["1", "12", "123", "1234"]
 ],
 uniformCellProperties: {
 borders: {
 left: { color: "blue", dashStyle: PowerPoint.ShapeLineDashStyle.solid, weight: 4 },
 right: { color: "blue", dashStyle: PowerPoint.ShapeLineDashStyle.solid, weight: 4 },
 top: { color: "red", dashStyle: PowerPoint.ShapeLineDashStyle.longDashDotDot, weight: 2 },
 bottom: { color: "red", dashStyle: PowerPoint.ShapeLineDashStyle.longDashDotDot, weight: 2 }
 }
 }
 });
 await context.sync();
});

dashStyle

Represents the dash style of the line.

dashStyle?: PowerPoint.ShapeLineDashStyle | "Dash" | "DashDot" | "DashDotDot" | "LongDash" | "LongDashDot" | "RoundDot" | "Solid" | "SquareDot" | "LongDashDotDot" | "SystemDash" | "SystemDot" | "SystemDashDot" | undefined;

Property Value

PowerPoint.ShapeLineDashStyle | "Dash" | "DashDot" | "DashDotDot" | "LongDash" | "LongDashDot" | "RoundDot" | "Solid" | "SquareDot" | "LongDashDotDot" | "SystemDash" | "SystemDot" | "SystemDashDot" | undefined

Remarks

API set: PowerPointApi 1.8

Examples

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/powerpoint/shapes/add-modify-tables.yaml

// Specifies a table's borders.
await PowerPoint.run(async (context) => {
 const shapes = context.presentation.getSelectedSlides().getItemAt(0).shapes;

 // Add a table, specifying border styles.
 shapes.addTable(3, 4, {
 values: [
 ["A", "BB", "CCC", "DDDD"],
 ["E", "FF", "GGG", "HHHH"],
 ["1", "12", "123", "1234"]
 ],
 uniformCellProperties: {
 borders: {
 left: { color: "blue", dashStyle: PowerPoint.ShapeLineDashStyle.solid, weight: 4 },
 right: { color: "blue", dashStyle: PowerPoint.ShapeLineDashStyle.solid, weight: 4 },
 top: { color: "red", dashStyle: PowerPoint.ShapeLineDashStyle.longDashDotDot, weight: 2 },
 bottom: { color: "red", dashStyle: PowerPoint.ShapeLineDashStyle.longDashDotDot, weight: 2 }
 }
 }
 });
 await context.sync();
});

transparency

Specifies the transparency percentage of the line as a value from 0.0 (opaque) through 1.0 (clear).

transparency?: number | undefined;

Property Value

number | undefined

Remarks

API set: PowerPointApi 1.8

weight

Represents the weight of the line, in points.

weight?: number | undefined;

Property Value

number | undefined

Remarks

API set: PowerPointApi 1.8

Examples

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/powerpoint/shapes/add-modify-tables.yaml

// Specifies a table's borders.
await PowerPoint.run(async (context) => {
 const shapes = context.presentation.getSelectedSlides().getItemAt(0).shapes;

 // Add a table, specifying border styles.
 shapes.addTable(3, 4, {
 values: [
 ["A", "BB", "CCC", "DDDD"],
 ["E", "FF", "GGG", "HHHH"],
 ["1", "12", "123", "1234"]
 ],
 uniformCellProperties: {
 borders: {
 left: { color: "blue", dashStyle: PowerPoint.ShapeLineDashStyle.solid, weight: 4 },
 right: { color: "blue", dashStyle: PowerPoint.ShapeLineDashStyle.solid, weight: 4 },
 top: { color: "red", dashStyle: PowerPoint.ShapeLineDashStyle.longDashDotDot, weight: 2 },
 bottom: { color: "red", dashStyle: PowerPoint.ShapeLineDashStyle.longDashDotDot, weight: 2 }
 }
 }
 });
 await context.sync();
});

Feedback

Was this page helpful?