Partager via


Bookmark.TCSCConverter(WdTCSCConverterDirection, Boolean, Boolean) Method

Definition

Converts the specified range of a Bookmark control from Traditional Chinese to Simplified Chinese or vice versa.

public void TCSCConverter (Microsoft.Office.Interop.Word.WdTCSCConverterDirection WdTCSCConverterDirection = Microsoft.Office.Interop.Word.WdTCSCConverterDirection.wdTCSCConverterDirectionAuto, bool CommonTerms = false, bool UseVariants = false);
abstract member TCSCConverter : Microsoft.Office.Interop.Word.WdTCSCConverterDirection * bool * bool -> unit
Public Sub TCSCConverter (Optional WdTCSCConverterDirection As WdTCSCConverterDirection = Microsoft.Office.Interop.Word.WdTCSCConverterDirection.wdTCSCConverterDirectionAuto, Optional CommonTerms As Boolean = false, Optional UseVariants As Boolean = false)

Parameters

CommonTerms
Boolean

true if Microsoft Office Word converts common expressions intact rather than converting on a character-by-character basis.

UseVariants
Boolean

true if Word uses Taiwan, Hong Kong SAR, and Macao SAR character variants. Can only be used if translating from Simplified Chinese to Traditional Chinese.

Examples

The following code example adds a Bookmark control to the first paragraph in the document and then converts the text in the bookmark from Traditional Chinese to Simplified Chinese or vice versa.

This example is for a document-level customization.

private void BookmarkTCSCCOnverter()
{
    this.Paragraphs[1].Range.InsertParagraphBefore();

    Microsoft.Office.Tools.Word.Bookmark bookmark1 =
        this.Controls.AddBookmark(this.Paragraphs[1].Range,
        "bookmark1");
    bookmark1.TCSCConverter(Word.WdTCSCConverterDirection.wdTCSCConverterDirectionTCSC,
        true, true);
}
Private Sub BookmarkTCSCCOnverter()

    Me.Paragraphs(1).Range.InsertParagraphBefore()

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

End Sub

Remarks

Optional Parameters

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

Applies to