'PRINT WITH DIALOG.BAS 'This script prints multiple graphs using a graph template and several data files. 'Modify the paths in the script to match your template file path and data file path. 'Also exports to a GIF with the DAT name Sub Main 'Create Grapher as an object Dim Grapher As Object 'Start Grapher Set Grapher = CreateObject("Grapher.Application") 'Remove quote from the following line to make Grapher visible Grapher.Visible(1) 'Open Grapher's Open dialog box '*******Change Directory to directory where DAT files are located******** Directory = "c:\Program Files\Golden Software\Grapher 7\Samples\" file$ = Dir$(Directory + "*.dat") '*******Change the Template to the name and location where the GRT file is located********** Template = "c:\Program Files\Golden Software\Grapher7\Templates\LinePlot.grt" While file$ <> "" 'Open the file in the directory in order Set doc = Grapher.Documents.Add(grfPlotDoc,Template,Directory+file$) 'Edit text with new date Set Text1 = doc.Shapes.Item("Text 1") Text1.text = "Some sample text here " + MonthName(Month(Now)) + " " _ + DatePart("d",Now) + ", " + DatePart("yyyy",Now) + " at " + DatePart("h",Now) + " PDT" 'Add text using Grapher date/time Text1.text ="More sample text here - <> at <> PDT" 'Export to same named GIF doc.Export(Directory+Left(file$,Len(file$)-3)+"gif") 'Close the plot window doc.Close() 'Open the next file file$ = Dir$() Wend 'Close Grapher Grapher.Quit() End Sub