Word.SelectionConvertToTableOptions interface
Note
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Represents the options for the Selection.convertToTable method.
Remarks
Properties
apply |
If provided, specifies whether to apply borders to the table of the specified format. Default value is |
apply |
If provided, specifies whether to apply color formatting to the table of the specified format. Default value is |
apply |
If provided, specifies whether to apply special formatting to the first column of the specified format. Default value is |
apply |
If provided, specifies whether to apply font formatting to the table of the specified format. Default value is |
apply |
If provided, specifies whether to format the first row as a header row of the specified format. Default value is |
apply |
If provided, specifies whether to apply special formatting to the last column of the specified format. Default value is |
apply |
If provided, specifies whether to apply special formatting to the last row of the specified format. Default value is |
apply |
If provided, specifies whether to apply shading to the table of the specified format. Default value is |
auto |
If provided, specifies whether to automatically resize the table to fit the contents. Default value is |
auto |
If provided, specifies the auto-fit behavior for the table. Used when the |
default |
If provided, specifies whether Microsoft Word automatically resizes cells in a table to fit the contents. The default value is |
format | If provided, specifies a preset format to apply to the table. If omitted, Word applies the default table format. |
initial |
If provided, specifies the initial width of each column in the table, in points. If omitted, Word calculates and adjusts the column width so that the table stretches from margin to margin. |
num |
If provided, specifies the number of columns in the table. If omitted, Word determines the number of columns based on the contents of the range. |
num |
If provided, specifies the number of rows in the table. If omitted, Word determines the number of rows based on the contents of the range. |
separator | If provided, specifies the character used to separate text into cells. The default value is |
Property Details
applyBorders
Note
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
If provided, specifies whether to apply borders to the table of the specified format. Default value is true
.
applyBorders?: boolean;
Property Value
boolean
Remarks
applyColor
Note
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
If provided, specifies whether to apply color formatting to the table of the specified format. Default value is true
.
applyColor?: boolean;
Property Value
boolean
Remarks
applyFirstColumn
Note
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
If provided, specifies whether to apply special formatting to the first column of the specified format. Default value is true
.
applyFirstColumn?: boolean;
Property Value
boolean
Remarks
applyFont
Note
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
If provided, specifies whether to apply font formatting to the table of the specified format. Default value is true
.
applyFont?: boolean;
Property Value
boolean
Remarks
applyHeadingRows
Note
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
If provided, specifies whether to format the first row as a header row of the specified format. Default value is true
.
applyHeadingRows?: boolean;
Property Value
boolean
Remarks
applyLastColumn
Note
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
If provided, specifies whether to apply special formatting to the last column of the specified format. Default value is false
.
applyLastColumn?: boolean;
Property Value
boolean
Remarks
applyLastRow
Note
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
If provided, specifies whether to apply special formatting to the last row of the specified format. Default value is false
.
applyLastRow?: boolean;
Property Value
boolean
Remarks
applyShading
Note
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
If provided, specifies whether to apply shading to the table of the specified format. Default value is true
.
applyShading?: boolean;
Property Value
boolean
Remarks
autoFit
Note
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
If provided, specifies whether to automatically resize the table to fit the contents. Default value is true
.
autoFit?: boolean;
Property Value
boolean
Remarks
autoFitBehavior
Note
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
If provided, specifies the auto-fit behavior for the table. Used when the defaultTableBehavior
property is enableAutoFit
. The default value is fixed
.
autoFitBehavior?: Word.AutoFitBehavior | "FixedSize" | "Content" | "Window";
Property Value
Word.AutoFitBehavior | "FixedSize" | "Content" | "Window"
Remarks
defaultTableBehavior
Note
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
If provided, specifies whether Microsoft Word automatically resizes cells in a table to fit the contents. The default value is disableAutoFit
.
defaultTableBehavior?: Word.DefaultTableBehavior | "DisableAutoFit" | "EnableAutoFit";
Property Value
Word.DefaultTableBehavior | "DisableAutoFit" | "EnableAutoFit"
Remarks
format
Note
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
If provided, specifies a preset format to apply to the table. If omitted, Word applies the default table format.
format?: Word.TableFormat | "None" | "Simple1" | "Simple2" | "Simple3" | "Classic1" | "Classic2" | "Classic3" | "Classic4" | "Colorful1" | "Colorful2" | "Colorful3" | "Columns1" | "Columns2" | "Columns3" | "Columns4" | "Columns5" | "Grid1" | "Grid2" | "Grid3" | "Grid4" | "Grid5" | "Grid6" | "Grid7" | "Grid8" | "List1" | "List2" | "List3" | "List4" | "List5" | "List6" | "List7" | "List8" | "ThreeDEffects1" | "ThreeDEffects2" | "ThreeDEffects3" | "Contemporary" | "Elegant" | "Professional" | "Subtle1" | "Subtle2" | "Web1" | "Web2" | "Web3";
Property Value
Word.TableFormat | "None" | "Simple1" | "Simple2" | "Simple3" | "Classic1" | "Classic2" | "Classic3" | "Classic4" | "Colorful1" | "Colorful2" | "Colorful3" | "Columns1" | "Columns2" | "Columns3" | "Columns4" | "Columns5" | "Grid1" | "Grid2" | "Grid3" | "Grid4" | "Grid5" | "Grid6" | "Grid7" | "Grid8" | "List1" | "List2" | "List3" | "List4" | "List5" | "List6" | "List7" | "List8" | "ThreeDEffects1" | "ThreeDEffects2" | "ThreeDEffects3" | "Contemporary" | "Elegant" | "Professional" | "Subtle1" | "Subtle2" | "Web1" | "Web2" | "Web3"
Remarks
initialColumnWidth
Note
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
If provided, specifies the initial width of each column in the table, in points. If omitted, Word calculates and adjusts the column width so that the table stretches from margin to margin.
initialColumnWidth?: number;
Property Value
number
Remarks
numColumns
Note
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
If provided, specifies the number of columns in the table. If omitted, Word determines the number of columns based on the contents of the range.
numColumns?: number;
Property Value
number
Remarks
numRows
Note
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
If provided, specifies the number of rows in the table. If omitted, Word determines the number of rows based on the contents of the range.
numRows?: number;
Property Value
number
Remarks
separator
Note
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
If provided, specifies the character used to separate text into cells. The default value is -
.
separator?: string;
Property Value
string