Share via


Bookmark.Kana Property (2007 System)

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.v9.0 (in Microsoft.Office.Tools.Word.v9.0.dll)

Syntax

'Declaration
<BrowsableAttribute(False)> _
Public Property Kana As WdKana
'Usage
Dim instance As Bookmark 
Dim value As WdKana 

value = instance.Kana

instance.Kana = value
[BrowsableAttribute(false)]
public WdKana Kana { get; set; }
[BrowsableAttribute(false)]
public:
property WdKana Kana {
    WdKana get ();
    void set (WdKana value);
}
public function get Kana () : WdKana 
public function set Kana (value : WdKana)

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 Class

Bookmark Members

Microsoft.Office.Tools.Word Namespace