Edit

Share via


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

[ API set: WordApi BETA (PREVIEW ONLY) ]

Properties

applyBorders

If provided, specifies whether to apply borders to the table of the specified format. Default value is true.

applyColor

If provided, specifies whether to apply color formatting to the table of the specified format. Default value is true.

applyFirstColumn

If provided, specifies whether to apply special formatting to the first column of the specified format. Default value is true.

applyFont

If provided, specifies whether to apply font formatting to the table of the specified format. Default value is true.

applyHeadingRows

If provided, specifies whether to format the first row as a header row of the specified format. Default value is true.

applyLastColumn

If provided, specifies whether to apply special formatting to the last column of the specified format. Default value is false.

applyLastRow

If provided, specifies whether to apply special formatting to the last row of the specified format. Default value is false.

applyShading

If provided, specifies whether to apply shading to the table of the specified format. Default value is true.

autoFit

If provided, specifies whether to automatically resize the table to fit the contents. Default value is true.

autoFitBehavior

If provided, specifies the auto-fit behavior for the table. Used when the defaultTableBehavior property is enableAutoFit. The default value is fixed.

defaultTableBehavior

If provided, specifies whether Microsoft Word automatically resizes cells in a table to fit the contents. The default value is disableAutoFit.

format

If provided, specifies a preset format to apply to the table. If omitted, Word applies the default table format.

initialColumnWidth

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.

numColumns

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.

numRows

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

[ API set: WordApi BETA (PREVIEW ONLY) ]

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

[ API set: WordApi BETA (PREVIEW ONLY) ]

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

[ API set: WordApi BETA (PREVIEW ONLY) ]

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

[ API set: WordApi BETA (PREVIEW ONLY) ]

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

[ API set: WordApi BETA (PREVIEW ONLY) ]

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

[ API set: WordApi BETA (PREVIEW ONLY) ]

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

[ API set: WordApi BETA (PREVIEW ONLY) ]

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

[ API set: WordApi BETA (PREVIEW ONLY) ]

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

[ API set: WordApi BETA (PREVIEW ONLY) ]

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

[ API set: WordApi BETA (PREVIEW ONLY) ]

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

[ API set: WordApi BETA (PREVIEW ONLY) ]

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

[ API set: WordApi BETA (PREVIEW ONLY) ]

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

[ API set: WordApi BETA (PREVIEW ONLY) ]

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

[ API set: WordApi BETA (PREVIEW ONLY) ]

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

[ API set: WordApi BETA (PREVIEW ONLY) ]

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

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]