Bookmark.Kana Property
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.
Gets or sets a value that indicates whether the specified range of Japanese language text in a Bookmark control is hiragana or katakana.
public:
property Microsoft::Office::Interop::Word::WdKana Kana { Microsoft::Office::Interop::Word::WdKana get(); void set(Microsoft::Office::Interop::Word::WdKana value); };
public Microsoft.Office.Interop.Word.WdKana Kana { get; set; }
member this.Kana : Microsoft.Office.Interop.Word.WdKana with get, set
Public Property Kana As WdKana
Property Value
One of the WdKana values.
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 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);
}
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
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.