AddText Method

The AddText method adds new text. Returns an AutoMText object.

Syntax

object.AddText( x, y, text, id )

 

Parameter Type Description
x Double required, X coordinate in page units
y Double required, Y coordinate in page units
text String required, text string
id Variant optional, text string name

 

Remarks

Math text instructions can be used for the text parameter value to create multi-line, date/time, or other complex text blocks.

Example 1

This example shows how to create a line of text.

Shapes.AddText( 2,5,"This is text")

Example 2

This example demonstrates adding complex text

Shapes.AddText( 2,5"\red Sample 128\n \fs71.429 ABC Co\n \dt(""dd MMM yyyy"")"

 

Used by: AutoShapes collection