Table of contents
TOC
Collapse the table of content
Expand the table of content

Fields.AddPhoneticGuide Method (Publisher)

office 365 dev account|Last Updated: 8/24/2017
|
3 Contributors

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

Syntax

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

_expression_A variable that represents a Fields object.

Parameters

NameRequired/OptionalData TypeDescription
RangeRequiredTextRangeThe text in the publication over which the phonetic text is displayed.
TextRequiredStringThe phonetic text to add.
AlignmentOptionalPbPhoneticGuideAlignmentTypeThe alignment of the added phonetic text.
RaiseOptionalVariantThe 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.
FontNameOptionalStringThe 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.
FontSizeOptionalVariantThe font size to use for the phonetic text. Default is 10 point.

Return Value

Field

Remarks

The Alignment parameter can be one of the PbPhoneticGuideAlignmentType constants declared in the Microsoft Publisher type library and shown in the following table.

ConstantDescription
pbPhoneticGuideAlignmentCenterCenters phonetic text over the specified range.
pbPhoneticGuideAlignmentDefaultCenters phonetic text over the specified range. The default.
pbPhoneticGuideAlignmentLeftLeft-aligns phonetic text with the specified range.
pbPhoneticGuideAlignmentOneTwoOneAdjusts the inside and outside spacing of the phonetic text in a 1:2:1 ratio.
pbPhoneticGuideAlignmentRightRight-aligns phonetic text with the specified range.
pbPhoneticGuideAlignmentZeroOneZeroAdjusts the inside and outside spacing of the phonetic text in a 0:1:0 ratio.

Example

This example adds a phonetic guide to the selected phrase "very nice."

Sub PhoneticGuide() 
 Selection.TextRange.Fields.AddPhoneticGuide _ 
 Range:=Selection.TextRange, Text:="ver-E nIs", _ 
 Alignment:=pbPhoneticGuideAlignmentCenter, _ 
 Raise:=11, FontSize:=7 
End Sub
© 2018 Microsoft