Expand Minimize
This topic has not yet been rated - Rate this topic

Bookmark.ConvertHangulAndHanja Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Converts the Bookmark control text from Hangul to Hanja or vice versa.

Namespace:  Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word (in Microsoft.Office.Tools.Word.dll)
void ConvertHangulAndHanja(
	ref Object ConversionsMode,
	ref Object FastConversion,
	ref Object CheckHangulEnding,
	ref Object EnableRecentOrdering,
	ref Object CustomDictionary
)

Parameters

ConversionsMode
Type: System.Object

Sets the direction for the conversion between Hangul and Hanja. Can be either of the following WdMultipleWordConversionsMode constants: wdHangulToHanja or wdHanjaToHangul. The default value is the current value of the MultipleWordConversionsMode property.

FastConversion
Type: System.Object

true if Microsoft Office Word automatically converts a word with only one suggestion for conversion. The default value is the current value of the HangulHanjaFastConversion property.

CheckHangulEnding
Type: System.Object

true if Word automatically detects Hangul endings and ignores them. The default value is the current value of the CheckHangulEndings property. This argument is ignored if the ConversionsMode argument is set to wdHanjaToHangul.

EnableRecentOrdering
Type: System.Object

true if Word displays the most recently used words at the top of the suggestions list. The default value is the current value of the EnableHangulHanjaRecentOrdering property.

CustomDictionary
Type: System.Object

The name of a custom Hangul-Hanja conversion dictionary. Use this argument in order to use a custom dictionary with Hangul-Hanja conversions not contained in the main dictionary.

Optional Parameters

For information on optional parameters, see Optional Parameters in Office Solutions.

The following code example adds a Bookmark control to the first paragraph in the document, then checks if the LanguageID of the bookmark is wdKorean. If so, it converts the bookmark from Hangul to Hanja or vice versa.

This example is for a document-level customization.

private void BookmarkConvertHangulAndHanja()
{
    Microsoft.Office.Tools.Word.Bookmark bookmark1 =
        this.Controls.AddBookmark(this.Paragraphs[1].Range,
        "bookmark1");

    object ConversionsMode = Word.WdMultipleWordConversionsMode
        .wdHangulToHanja;
    object FastConversion = false;
    object CheckHangulEnding = true;
    object EnableRecentOrdering = true;
    object CustomDictionary = missing;

    if (bookmark1.LanguageID == Word.WdLanguageID.wdKorean)
    {
        bookmark1.ConvertHangulAndHanja(ref ConversionsMode,
            ref FastConversion, ref CheckHangulEnding, ref 
            EnableRecentOrdering, ref CustomDictionary);
    }
}
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.