Bookmark.PhoneticGuide Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds phonetic guides to the Bookmark control.
public void PhoneticGuide (string Text, Microsoft.Office.Interop.Word.WdPhoneticGuideAlignmentType Alignment, int Raise = 0, int FontSize = 0, string FontName = "");
abstract member PhoneticGuide : string * Microsoft.Office.Interop.Word.WdPhoneticGuideAlignmentType * int * int * string -> unit
Public Sub PhoneticGuide (Text As String, Optional Alignment As WdPhoneticGuideAlignmentType, Optional Raise As Integer = 0, Optional FontSize As Integer = 0, Optional FontName As String = "")
Parameters
- Text
- String
The phonetic text to add.
- Alignment
- WdPhoneticGuideAlignmentType
WdPhoneticGuideAlignmentType. The alignment of the added phonetic text.
- Raise
- 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
- 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
- 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.
Examples
The following code example adds a phonetic guide to the bookmark text "tres chic."
This example is for a document-level customization.
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");
}
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
Remarks
Optional Parameters
For information on optional parameters, see Optional Parameters in Office Solutions.