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)

WdKana Kana { get; set; }

Property Value

Type: Microsoft.Office.Interop.Word.WdKana

One of the WdKana values.

This property returns F:Microsoft.Office.Interop.Word.WdConstants.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 F:Microsoft.Office.Interop.Word.WdConstants.wdUndefined, an exception is thrown.

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 void BookmarkKana()
    Microsoft.Office.Tools.Word.Bookmark bookmark1 =
    bookmark1.Kana = Word.WdKana.wdKanaHiragana;
    MessageBox.Show("Bookmark1 contains " + bookmark1.LanguageIDFarEast);
Return to top