AutoMText Object

The AutoMText object represents a stand-alone text object in the document. Text objects are created by the AutoShapes AddText method.

Derived from: AutoShape object (All methods and properties of AutoShape apply to this object.)

Properties

Background

FitPlot

Font

FrameStyle

Line

Margin

Text

UnlinkFitPlot

Worksheet

Example

The following example shows how to create a text block.

Sub Main

 

 'Declare the variable that references the application

  Dim GrapherApp As Object

 

 'Creates an instance of the Grapher Application object

 'and assigns it to the variable named "GrapherApp"

  Set GrapherApp = CreateObject("Grapher.Application")

 

 'Make Grapher visible

  GrapherApp.Visible = True

 

 'Declare Docs as Object

  Dim Docs As Object

 

 'Assigns the Documents collection to the

 'variable named "Docs"

  Set Docs = GrapherApp.Documents

 

 'Declare Plot As Object

  Dim Plot As Object

 

 'Creates a new plot window and assigns it to

 'the variable named "Plot"

  Set Plot = Docs.Add(grfPlotDoc)

 

 'Declare Shapes As Object

  Dim Shapes As Object

 

 'Assigns the AutoShapes collection to

 'the variable named "Shapes"

  Set Shapes = Plot.Shapes

 

 'Add Text

  Set Text1 = Shapes.AddText( 2,5,This is text)

 

End Sub