Bookmark.ConvertHangulAndHanja Method

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)

Syntax

'Declaration
Sub ConvertHangulAndHanja ( _
    ByRef ConversionsMode As Object, _
    ByRef FastConversion As Object, _
    ByRef CheckHangulEnding As Object, _
    ByRef EnableRecentOrdering As Object, _
    ByRef CustomDictionary As Object _
)
void ConvertHangulAndHanja(
    ref Object ConversionsMode,
    ref Object FastConversion,
    ref Object CheckHangulEnding,
    ref Object EnableRecentOrdering,
    ref Object CustomDictionary
)

Parameters

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

Remarks

Optional Parameters

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

Examples

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 Sub BookmarkConvertHangulAndHanja()

    Dim Bookmark1 As Microsoft.Office.Tools.Word.Bookmark = _
        Me.Controls.AddBookmark(Me.Paragraphs(1).Range, "Bookmark1")

    Dim ConversionsMode As Object = Word. _
        WdMultipleWordConversionsMode.wdHangulToHanja
    Dim FastConversion As Object = False
    Dim CheckHangulEnding As Object = True
    Dim EnableRecentOrdering As Object = True

    If bookmark1.LanguageID = Word.WdLanguageID.wdKorean Then
        Bookmark1.ConvertHangulAndHanja(Word _
            .WdMultipleWordConversionsMode.wdHangulToHanja, _
            False, True, True)
    End If

End Sub
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);
    }
}

.NET Framework Security

See Also

Reference

Bookmark Interface

Microsoft.Office.Tools.Word Namespace