Previous Document Next Document

Object Model Reference : Classes : T : TextRange : Methods : TextRange.InsertBeforeWide


TextRange.InsertBeforeWide

Function InsertBeforeWide(Text As String, [LanguageID As cdrTextLanguage = cdrLanguageNone], [CharSet As cdrTextCharSet = cdrCharSetMixed], [Font As String]) As TextRange

Description

Member of TextRange

The InsertBeforeWide method inserts Unicode text before the first character in a text range, returning a text range that contains only the inserted characters.

Parameter
Description
Text
Specifies the text to insert
LanguageID
Specifies the language code. This parameter is optional, and its default value is cdrLanguageNone (0).
CharSet
Specifies the character set. This parameter is optional, and its default value is cdrCharSetMixed (-1).
Font
Specifies the font. This parameter is optional.

VBA example

The following VBA example creates two Japanese characters by using their character codes, and it then inserts the same two characters before the first ones.

Sub Test()
 Dim t As Text
 Dim s As Shape
 Dim d As Document
 Set d = CreateDocument
 Set s = d.ActiveLayer.CreateParagraphTextWide(2, 2, 8, 8, _
  ChrW$(-32022) & ChrW$(-32072), cdrJapanese, cdrCharSetShiftJIS, _
  Font:="MS Gothic")
 Set t = s.Text
 t.Story.InsertBeforeWide " " & t.Story.WideText
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.