AddPhoneticGuide Method

       

Returns a Field object that represents phonetic text added to the specified range.

expression.AddPhoneticGuide(Range, Text, Alignment, Raise, FontName, FontSize)

expression   Required. An expression that returns a Fields object.

Range  Required TextRange object. The text in the publication over which the phonetic text is displayed

Text  Required String. The phonetic text to add.

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

PbPhoneticGuideAlignmentType can be one of these PbPhoneticGuideAlignmentType constants.
pbPhoneticGuideAlignmentCenter  Centers phonetic text over the specified range.
pbPhoneticGuideAlignmentDefault default  Centers phonetic text over the specified range.
pbPhoneticGuideAlignmentLeft  Left-aligns phonetic text with the specified range.
pbPhoneticGuideAlignmentOneTwoOne  Adjusts the inside and outside spacing of the phonetic text in a 1:2:1 ratio.
pbPhoneticGuideAlignmentRight  Right-aligns phonetic text with the specified range.
pbPhoneticGuideAlignmentZeroOneZero  Adjusts the inside and outside spacing of the phonetic text in a 0:1:0 ratio.

Raise  Optional Variant. 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 Publisher automatically sets the phonetic text at an optimum distance above the specified range.

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

FontSize  Optional Variant. The font size to use for the phonetic text. Default is 10 point.

Example

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

Sub PhoneticGuide()
    Selection.TextRange.Fields.AddPhoneticGuide _
        Range:=Selection.TextRange, Text:="tray sheek", _
        Alignment:=pbPhoneticGuideAlignmentCenter, _
        Raise:=11, FontSize:=7
End Sub