'ExportSelectedOnly.bas opens a selected SRF file, 'selects a map, and exports the single map to the 'specified export file. Sub Main ExportFile = "C:\temp\test.jpg" 'Declare the variable that will reference the application Dim SurferApp As Object Set SurferApp = CreateObject("Surfer.Application") SurferApp.Visible = True 'Declares Plot as an object and opens an SRF file SRFfilepath = GetFilePath( , "srf",SurferApp.Path+"\samples\","Open SRF File",0) Dim Plot As Object Set Plot = SurferApp.Documents.Open(SRFfilepath) 'Assigns the map in the SRF file to the variable "MapFrame1" 'You may need to change the Index number so that the map in the SRF file is selected. Dim MapFrame1 As Object Set MapFrame1 = Plot.Shapes.Item(Index:=2) 'Selects the map MapFrame1.Select 'Exports the selected objects only to the specified ExportFile path Plot.Export(FileName:=ExportFile, SelectionOnly:=True) End Sub