TCSCConverter Method
Collapse the table of content
Expand the table of content

Bookmark.TCSCConverter Method (WdTCSCConverterDirection, Boolean, Boolean)

 

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

Namespace:   Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word (in Microsoft.Office.Tools.Word.dll)

void TCSCConverter(
	WdTCSCConverterDirection WdTCSCConverterDirection = WdTCSCConverterDirection.wdTCSCConverterDirectionAuto,
	bool CommonTerms = false,
	bool UseVariants = false
)

Parameters

WdTCSCConverterDirection
Type: Microsoft.Office.Interop.Word.WdTCSCConverterDirection

WdTCSCConverterDirection.

CommonTerms
Type: System.Boolean

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

UseVariants
Type: System.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.

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 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);
}
Return to top
Show:
© 2016 Microsoft