Edit

Share via


PowerPoint JavaScript preview APIs

New PowerPoint JavaScript APIs are first introduced in "preview" and later become part of a specific, numbered requirement set after sufficient testing occurs and user feedback is acquired.

Note

Preview APIs are subject to change and are not intended for use in a production environment. We recommend that you try them out in test and development environments only. Do not use preview APIs in a production environment or within business-critical documents.

To use preview APIs:

API list

The following table lists the PowerPoint JavaScript APIs currently in preview. For a complete list of all PowerPoint JavaScript APIs (including preview APIs and previously released APIs), see all PowerPoint JavaScript APIs.

Class Fields Description
Border 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.
Borders bottom Gets the bottom border.
diagonalDown Gets the diagonal border (top-left to bottom-right).
diagonalUp Gets the diagonal border (bottom-left to top-right).
left Gets the left border.
right Gets the right border.
top Gets the top border.
Margins bottom Specifies the bottom margin in points.
left Specifies the left margin in points.
right Specifies the right margin in points.
top Specifies the top margin in points.
Table clear(options?: PowerPoint.TableClearOptions) Clears table values and formatting.
columns Gets the collection of columns in the table.
mergeCells(rowIndex: number, columnIndex: number, rowCount: number, columnCount: number) Creates a merged area starting at the cell specified by rowIndex and columnIndex.
rows Gets the collection of rows in the table.
styleOptions Gets the table style options.
TableAddOptions style Specifies value that represents the table style.
TableCell borders Gets the collection of borders for the table cell.
fill Gets the fill color of the table cell.
font Gets the font of the table cell.
horizontalAlignment Specifies the horizontal alignment of the text in the table cell.
indentLevel Specifies the indent level of the text in the table cell.
margins Gets the set of margins in the table cell.
resize(rowCount: number, columnCount: number) Resizes the table cell to span across a specified number of rows and columns.
split(rowCount: number, columnCount: number) Splits the cell into the specified number of rows and columns.
textRuns Specifies the contents of the table cell as an array of TextRun objects.
verticalAlignment Specifies the vertical alignment of the text in the table cell.
TableClearOptions all Specifies if both values and formatting of the table should be cleared.
format Specifies if the formatting of the table should be cleared.
text Specifies if the values of the table should be cleared.
TableColumn columnIndex Returns the index number of the column within the column collection of the table.
delete() Deletes the column.
width Retrieves the width of the column in points.
TableColumnAddOptions specificCellProperties If provided, specifies properties for each cell in the table column.
uniformCellProperties Specifies the formatting which applies uniformly to all of the table column cells.
TableColumnCollection add(index?: number | null, count?: number) Adds one or more columns to the table.
deleteColumns(columns: PowerPoint.TableColumn[]) Deletes the specified columns from the collection.
getCount() Gets the number of columns in the collection.
getItemAt(index: number) Gets the column using its zero-based index in the collection.
items Gets the loaded child items in this collection.
TableRow currentHeight Retrieves the current height of the row in points.
delete() Deletes the row.
height Specifies the height of the row in points.
rowIndex Returns the index number of the row within the rows collection of the table.
TableRowAddOptions specificCellProperties If provided, specifies properties for each cell in the table row.
uniformCellProperties Specifies the formatting which applies uniformly to all of the table row cells.
TableRowCollection add(index?: number | null, count?: number) Adds one or more rows to the table.
deleteRows(rows: PowerPoint.TableRow[]) Deletes the specified rows from the collection.
getCount() Gets the number of rows in the collection.
getItemAt(index: number) Gets the row using its zero-based index in the collection.
items Gets the loaded child items in this collection.
TableStyleOptions areColumnsBanded Specifies if the columns show banded formatting in which odd columns are highlighted differently from even ones, to make reading the table easier.
areRowsBanded Specifies if the rows show banded formatting in which odd rows are highlighted differently from even ones, to make reading the table easier.
isFirstColumnHighlighted Specifies if the first column contains special formatting.
isFirstRowHighlighted Specifies if the first row contains special formatting.
isLastColumnHighlighted Specifies if the last column contains special formatting.
isLastRowHighlighted Specifies if the last row contains special formatting.
style Specifies the table style.

See also