Bookmark.ConvertHangulAndHanja(Object, Object, Object, Object, Object) Method
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.
Converts the Bookmark control text from Hangul to Hanja or vice versa.
public void ConvertHangulAndHanja (ref object ConversionsMode, ref object FastConversion, ref object CheckHangulEnding, ref object EnableRecentOrdering, ref object CustomDictionary);
abstract member ConvertHangulAndHanja : obj * obj * obj * obj * obj -> unit
Public Sub ConvertHangulAndHanja (Optional ByRef ConversionsMode As Object, Optional ByRef FastConversion As Object, Optional ByRef CheckHangulEnding As Object, Optional ByRef EnableRecentOrdering As Object, Optional ByRef CustomDictionary As Object)
Parameters
- ConversionsMode
- 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
- 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
- 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
- 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
- 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.
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 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);
}
}
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
Remarks
Optional Parameters
For information on optional parameters, see Optional Parameters in Office Solutions.