Sub Main 'Create Grapher as an Object Dim Grapher As Object Set Grapher = CreateObject("Grapher.Application") Grapher.Visible = True '======================================== 'User-defined variables '======================================== path$ = "C:\temp\" projfile$ = "OriginalProject.grf" newwkbk$ = "NewWorkbook.xlsx" '======================================== 'Open an existing document Set PlotDoc = Grapher.Documents.Open(path$+projfile$) 'Loop through all plots in all graphs For i=1 To PlotDoc.Shapes.Count If PlotDoc.Shapes.Item(i).Type=grfShapeGraph Then Set Graph = PlotDoc.Shapes.Item(i) For j=1 To Graph.Plots.Count Set Plot = Graph.Plots.Item(j) 'Searches through the worksheet for each plot and finds the ! character that denotes the sheet name. char = InStrRev(Plot.Worksheet,"!") 'Save what's after the ! character as the sheet name wksheet$ = Right(Plot.Worksheet,Len(Plot.Worksheet)-char) 'Set New Worksheets for plots Plot.Worksheet = path$ +newwkbk$ +"!"+wksheet$ Next j End If Next i End Sub