Word.BorderType enum
The border types.
Remarks
Examples
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/40-tables/manage-formatting.yaml
// Gets border details about the first of the first table in the document.
await Word.run(async (context) => {
const firstTable: Word.Table = context.document.body.tables.getFirst();
const firstCell: Word.TableCell = firstTable.getCell(0, 0);
const borderLocation = "Left";
const border: Word.TableBorder = firstCell.getBorder(borderLocation);
border.load(["type", "color", "width"]);
await context.sync();
console.log(`Details about the ${borderLocation} border of the first table's first cell:`, `- Color: ${border.color}`, `- Type: ${border.type}`, `- Width: ${border.width} points`);
});
Fields
| dashDotStroked = "DashDotStroked" | Dash-dot-stroked border. |
| dashed = "Dashed" | Dashed border. |
| dashedSmall = "DashedSmall" | Dashed small border. |
| dot2Dashed = "Dot2Dashed" | Double dot-dashed border. |
| dotDashed = "DotDashed" | Dot-dashed border. |
| dotted = "Dotted" | Dotted border. |
| double = "Double" | Double border. |
| doubleWave = "DoubleWave" | Double wave border. |
| mixed = "Mixed" | Mixed border type. |
| none = "None" | No border. |
| single = "Single" | Single border. |
| thickThinLarge = "ThickThinLarge" | Thick-thin large border. |
| thickThinMed = "ThickThinMed" | Thick-thin medium border. |
| thickThinSmall = "ThickThinSmall" | Thick-thin small border. |
| thinThickLarge = "ThinThickLarge" | Thin-thick large border. |
| thinThickMed = "ThinThickMed" | Thin-thick medium border. |
| thinThickSmall = "ThinThickSmall" | Thin-thick small border. |
| thinThickThinLarge = "ThinThickThinLarge" | Thin-thick-thin large border. |
| thinThickThinMed = "ThinThickThinMed" | Thin-thick-thin medium border. |
| thinThickThinSmall = "ThinThickThinSmall" | Thin-thick-thin small border. |
| threeDEmboss = "ThreeDEmboss" | 3D Emboss border. |
| threeDEngrave = "ThreeDEngrave" | 3D Engrave border. |
| triple = "Triple" | Triple border. |
| wave = "Wave" | Wave border. |