Bookmark.Kana Property

Gets or sets a value that indicates whether the specified range of Japanese language text in a Bookmark control is hiragana or katakana.

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

Syntax

'Declaration
Property Kana As WdKana
WdKana Kana { get; set; }

Property Value

Type: WdKana
One of the WdKana values.

Remarks

This property returns wdUndefined if the range of the Bookmark control contains a mix of hiragana and katakana or if the range contains some non-Japanese text. If you set the Kana property to wdUndefined, an exception is thrown.

Examples

The following code example adds a Bookmark control to the first paragraph and displays a message if the text contains hiragana characters.

This example is for a document-level customization.

Private Sub BookmarkKana()

    Dim Bookmark1 As Microsoft.Office.Tools.Word.Bookmark = _
        Me.Controls.AddBookmark(Me.Paragraphs(1).Range, "Bookmark1")
    Bookmark1.Kana = Word.WdKana.wdKanaHiragana
    MessageBox.Show("Bookmark1 contains " & _
        Bookmark1.LanguageIDFarEast.ToString)

End Sub
private void BookmarkKana()
{
    Microsoft.Office.Tools.Word.Bookmark bookmark1 =
        this.Controls.AddBookmark(this.Paragraphs[1].Range,
        "bookmark1");
    bookmark1.Kana = Word.WdKana.wdKanaHiragana;
    MessageBox.Show("Bookmark1 contains " + bookmark1.LanguageIDFarEast);
}

.NET Framework Security

See Also

Reference

Bookmark Interface

Microsoft.Office.Tools.Word Namespace