Bookmark.ConvertHangulAndHanja Method (Object, Object, Object, Object, Object)


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


Type: System.Object

Sets the direction for the conversion between Hangul and Hanja. Can be either of the following T:Microsoft.Office.Interop.Word.WdMultipleWordConversionsMode constants: F:Microsoft.Office.Interop.Word.WdMultipleWordConversionsMode.wdHangulToHanja or F:Microsoft.Office.Interop.Word.WdMultipleWordConversionsMode.wdHanjaToHangul. The default value is the current value of the P:Microsoft.Office.Interop.Word.Options.MultipleWordConversionsMode property.

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 P:Microsoft.Office.Interop.Word.Options.HangulHanjaFastConversion property.

Type: System.Object

true if Word automatically detects Hangul endings and ignores them. The default value is the current value of the P:Microsoft.Office.Interop.Word.Options.CheckHangulEndings property. This argument is ignored if the ConversionsMode argument is set to F:Microsoft.Office.Interop.Word.WdMultipleWordConversionsMode.wdHanjaToHangul.

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 P:Microsoft.Office.Interop.Word.Options.EnableHangulHanjaRecentOrdering property.

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.

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 =

    object ConversionsMode = Word.WdMultipleWordConversionsMode
    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);
Return to top