'PrintAllSrf.bas prints all the SRF files in the specified directory ' with the path and file name. TB - 18 May 06. Sub Main Debug.Print "----- ";Time;" -----" Set surf = CreateObject("surfer.application") surf.Visible = True path1 = "c:\incoming\temp\" file1 = Dir (path1+"*.srf") While file1 <> "" Debug.Print path1+file1 surf.Documents.Open(path1+file1) Set plotdoc1 = surf.ActiveDocument file1withslashes = "" For i = 1 To Len(path1+file1) file1withslashes = file1withslashes + Mid(path1+file1,i,1) If Mid(path1+file1,i,1) = "\" Then file1withslashes = file1withslashes + "\" Next i 'Debug.Print file1withslashes 'Set text1 = plotdoc1.Shapes.AddText(1,1,file1withslashes) 'text1.Font.Size = 8 plotdoc1.Shapes.AddText(1,1,file1withslashes).Font.Size = 8 plotdoc1.PrintOut(srfFitToPage) plotdoc1.Close(srfSaveChangesNo) file1 = Dir() 'get next file Wend surf.Quit End Sub