Word.Interfaces.TextFrameData interface

An interface describing the data returned by calling textFrame.toJSON().

Properties

autoSizeSetting

The automatic sizing settings for the text frame. A text frame can be set to automatically fit the text to the text frame, to automatically fit the text frame to the text, or not perform any automatic sizing.

bottomMargin

Represents the bottom margin, in points, of the text frame.

hasText

Specifies if the text frame contains text.

leftMargin

Represents the left margin, in points, of the text frame.

noTextRotation

Returns True if text in the text frame shouldn't rotate when the shape is rotated.

orientation

Represents the angle to which the text is oriented for the text frame. See Word.ShapeTextOrientation for details.

rightMargin

Represents the right margin, in points, of the text frame.

topMargin

Represents the top margin, in points, of the text frame.

verticalAlignment

Represents the vertical alignment of the text frame. See Word.ShapeTextVerticalAlignment for details.

wordWrap

Determines whether lines break automatically to fit text inside the shape.

Property Details

autoSizeSetting

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.

The automatic sizing settings for the text frame. A text frame can be set to automatically fit the text to the text frame, to automatically fit the text frame to the text, or not perform any automatic sizing.

autoSizeSetting?: Word.ShapeAutoSize | "None" | "TextToFitShape" | "ShapeToFitText" | "Mixed";

Property Value

Word.ShapeAutoSize | "None" | "TextToFitShape" | "ShapeToFitText" | "Mixed"

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

bottomMargin

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 bottom margin, in points, of the text frame.

bottomMargin?: number;

Property Value

number

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

hasText

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.

Specifies if the text frame contains text.

hasText?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

leftMargin

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 left margin, in points, of the text frame.

leftMargin?: number;

Property Value

number

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

noTextRotation

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.

Returns True if text in the text frame shouldn't rotate when the shape is rotated.

noTextRotation?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

orientation

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 angle to which the text is oriented for the text frame. See Word.ShapeTextOrientation for details.

orientation?: Word.ShapeTextOrientation | "None" | "Horizontal" | "EastAsianVertical" | "Vertical270" | "Vertical" | "EastAsianHorizontalRotated" | "Mixed";

Property Value

Word.ShapeTextOrientation | "None" | "Horizontal" | "EastAsianVertical" | "Vertical270" | "Vertical" | "EastAsianHorizontalRotated" | "Mixed"

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

rightMargin

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 right margin, in points, of the text frame.

rightMargin?: number;

Property Value

number

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

topMargin

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 top margin, in points, of the text frame.

topMargin?: number;

Property Value

number

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

verticalAlignment

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 vertical alignment of the text frame. See Word.ShapeTextVerticalAlignment for details.

verticalAlignment?: Word.ShapeTextVerticalAlignment | "Top" | "Middle" | "Bottom";

Property Value

Word.ShapeTextVerticalAlignment | "Top" | "Middle" | "Bottom"

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

wordWrap

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.

Determines whether lines break automatically to fit text inside the shape.

wordWrap?: boolean;

Property Value

boolean

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]