PhoneticGuide Method

Microsoft Word Visual Basic

Show All Show All

PhoneticGuide Method

Adds phonetic guides to the specified range.

expression.PhoneticGuide(Text, Alignment, Raise, FontSize, FontName)

expression    Required. An expression that returns one of the objects in the Applies To list.

Text   Required String. The phonetic text to add.

Alignment   Optional WdPhoneticGuideAlignmentType. The alignment of the added phonetic text.

WdPhoneticGuideAlignmentType can be one of these WdPhoneticGuideAlignmentType constants.
wdPhoneticGuideAlignmentCenter Microsoft Word centers phonetic text over the specified range. This is the default value.
wdPhoneticGuideAlignmentLeft Word left-aligns phonetic text with the specified range.
wdPhoneticGuideAlignmentOneTwoOne Word adjusts the inside and outside spacing of the phonetic text in a 1:2:1 ratio.
wdPhoneticGuideAlignmentRight Word right-aligns phonetic text with the specified range.
wdPhoneticGuideAlignmentRightVertical Word aligns the phonetic text on the right side of vertical text.
wdPhoneticGuideAlignmentZeroOneZero Word adjusts the inside and outside spacing of the phonetic text in a 0:1:0 ratio.

Raise   Optional Long. The distance (in points) from the top of the text in the specified range to the top of the phonetic text. If no value is specified, Microsoft Word automatically sets the phonetic text at an optimum distance above the specified range.

FontSize   Optional Long. The font size to use for the phonetic text. If no value is specified, Word uses a font size 50 percent smaller than the text in the specified range.

FontName   Optional String. The name of the font to use for the phonetic text. If no value is specified, Word uses the same font as the text in the specified range.

Remarks

For more information on using Word with East Asian languages, see Word features for East Asian languages.

Example

This example adds a phonetic guide to the selected phrase "tres chic."

Selection.Range.PhoneticGuide Text:="tray sheek", _
    Alignment:=wdPhoneticGuideAlignmentCenter, _
    Raise:=11, FontSize:=7