Partager via


Bookmark.PhoneticGuide Method

Adds phonetic guides to the Bookmark control.

Namespace:  Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word (in Microsoft.Office.Tools.Word.dll)

Syntax

'Declaration
Sub PhoneticGuide ( _
    Text As String, _
    Alignment As WdPhoneticGuideAlignmentType, _
    Raise As Integer, _
    FontSize As Integer, _
    FontName As String _
)
void PhoneticGuide(
    string Text,
    WdPhoneticGuideAlignmentType Alignment,
    int Raise,
    int FontSize,
    string FontName
)

Parameters

  • Raise
    Type: System.Int32

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

  • FontSize
    Type: System.Int32

    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 Bookmark control.

  • FontName
    Type: System.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 Bookmark control.

Remarks

Optional Parameters

For information on optional parameters, see Optional Parameters in Office Solutions.

Examples

The following code example adds a phonetic guide to the bookmark text "tres chic."

This example is for a document-level customization.

Private Sub BookmarkPhoneticGuide()

    Me.Paragraphs(1).Range.InsertParagraphBefore()
    Dim Bookmark1 As Microsoft.Office.Tools.Word.Bookmark = _
        Me.Controls.AddBookmark(Me.Paragraphs(1).Range, "Bookmark1")

    Bookmark1.Text = "tres chic"
    Bookmark1.PhoneticGuide("tray sheek", Word _
        .WdPhoneticGuideAlignmentType.wdPhoneticGuideAlignmentCenter, _
        11, 7, "Arial")

End Sub
private void BookmarkPhoneticGuide()
{
    this.Paragraphs[1].Range.InsertParagraphBefore();
    Microsoft.Office.Tools.Word.Bookmark bookmark1 =
        this.Controls.AddBookmark(this.Paragraphs[1].Range,
        "bookmark1");
    bookmark1.Text = "tres chic";

    bookmark1.PhoneticGuide("tray sheek",
        Word.WdPhoneticGuideAlignmentType.wdPhoneticGuideAlignmentCenter,
        11, 7, "Arial");
}

.NET Framework Security

See Also

Reference

Bookmark Interface

Microsoft.Office.Tools.Word Namespace