Sub Main 'Declare the variable that will reference 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 Plot as Object Dim Plot As Object 'Creates a new plot window Set Plot = GrapherApp.Documents.Add(grfPlotDoc) 'Declares Shapes as an object Dim Shapes As Object 'Assigns the Shapes collection to the variable named "Shapes" Set Shapes = Plot.Shapes 'Add a text object that contains two lines Shapes.AddText(2,4,"This is a text block" + vbCrLf + "with two rows.") 'Add another text object that shows how to insert a symbol Shapes.AddText(2,6,"This is a bullet \a183 more text") 'This example shows how to include bold , italics and strikethrough text Shapes.AddText(2,1,"This is {\b bold}, {\i italic} and {\strike strikethrough} text.") 'This example shows how to insert the current date/time Shapes.AddText(2,7,"\date \time ") 'Insert user input data Min = "10" Max = "25" Shapes.AddText(2,3,"[" + Min + "] to [" + Max + "]") 'This example shows how to add text with different fonts Shapes.AddText(2,5,"This is some text {\f" + Chr(34) + "Wingdings" + Chr(34) + " in a different font } than the rest.") 'This example shows how to insert the current date/time with custom formatting Shapes.AddText( 2,2,"text with date/time: \dt(""dd-mmm-yy"")") 'This example shows how to insert text as part of a template Shapes.AddText(2,1.75,"text with template: {\f""Garamond"" /}\ssbeg(30,-45,left,top) \fs57.143 y\ssend \ssbeg(20,-20,right,bottom) \fs57.143 x\ssend") 'This example shows how to insert a symbol using the symbol fonts Shapes.AddText(2,1.5,"text with symbol: \f""GSI Default Symbols"" ") End Sub