Object Model Reference : Classes : L : Layer : Methods : Layer.CreateArtisticText |
Function CreateArtisticText(Left As Double, Bottom As Double, Text As String, [LanguageID As cdrTextLanguage = cdrLanguageNone], [CharSet As cdrTextCharSet = cdrCharSetMixed], [Font As String], [Size As Single], [Bold As cdrTriState = cdrUndefined], [Italic As cdrTriState = cdrUndefined], [Underline As cdrFontLine = cdrMixedFontLine]), [Alignment As cdrAlignment = cdrMixedAlignment]) As Shape
Member of Layer
The CreateArtisticText method creates an artistic text object at a specified location on a layer. You can specify various properties for the object.
Parameter
|
Description
|
Left
|
Specifies, in document units, the horizontal position of the artistic text
|
Bottom
|
Specifies, in document units, the vertical position of the artistic text
|
Text
|
Specifies the content for the artistic text. The value of the Text parameter becomes the actual text created with the CreateArtisticText method.
|
LanguageID
|
Specifies the language. This parameter is optional, and its default value is cdrLanguageNone (0).
|
CharSet
|
|
Font
|
Specifies the font. This parameter is optional.
|
Size
|
Specifies the font size. This parameter is optional, and its default value is 0.
|
Bold
|
Specifies whether to apply boldface. This parameter is optional, and its default value is cdrUndefined (-2).
|
Italic
|
Specifies whether to apply italics. This parameter is optional, and its default value is cdrUndefined (-2).
|
Underline
|
Specifies an underline to apply. This parameter is optional, and its default value is cdrMixedFontLine (7).
|
Alignment
|
Specifies the alignment. This parameter is optional, and its default value is cdrMixedAlignment (6).
|
The following VBA example adds the word page: and the page number to the lower-left corner of the active layer of each page.
Sub Test() |
Dim p As Page |
For Each p In ActiveDocument.Pages |
p.ActiveLayer.CreateArtisticText 0, 0, "page: " & p.Index, _ |
cdrEnglishUS, , "Arial", 6, cdrTrue, cdrTrue, , cdrLeftAlignment |
Next p |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.