Bookmark.TCSCConverter Method
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)
Syntax
'Declaration
Sub TCSCConverter ( _
WdTCSCConverterDirection As WdTCSCConverterDirection, _
CommonTerms As Boolean, _
UseVariants As Boolean _
)
void TCSCConverter(
WdTCSCConverterDirection WdTCSCConverterDirection,
bool CommonTerms,
bool UseVariants
)
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.
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 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 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
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);
}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.