Expand Minimize

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

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 =
        this.Controls.AddBookmark(this.Paragraphs[1].Range,
        "bookmark1");
    bookmark1.Kana = Word.WdKana.wdKanaHiragana;
    MessageBox.Show("Bookmark1 contains " + bookmark1.LanguageIDFarEast);
}

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft