'PRINT WITH DIALOG.BAS 'This script prints multiple graphs using a graph template and several data files. 'Press the Cancel button in the Open dialog box to end the loop. Modify the paths 'in the script to match your template file path and data file path. 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 file$ = GetFilePath$(,"dat;xls","C:\Program Files\Golden Software\Grapher\Samples\","Open",0) While file$ <> "" 'Open the template file with data file selected in the Open dialog box Set doc = Grapher.Documents.Add(0,"C:\Program Files\Golden Software\Grapher\Samples\lineplot.grt",file$) 'Print the graph doc.Print() 'Close the plot window doc.Close() 'Open another data file file$ = GetFilePath$(,"dat;xls","C:\Program Files\Golden Software\Grapher\Samples\","Open",0) Wend 'Close Grapher Grapher.Quit() End Sub