Edit this in notepad and save as a .vbs file extension. You can continue with Excels' Object Model using the instance of xlApp you have created.
Const Overwrite = True
Const SaveChanges = True
strSource = "f:\a\axys3\users\brandon\test.txt"
strDest = "C:\Users\btoney\Desktop\IMRF\test.txt"
Set oFSO = CreateObject("Scripting.FileSystemObject")
oFSO.CopyFile strSource, strDest , Overwrite
set xlApp = CreateObject("Excel.Application")
xlApp.visible = TRUE
xlApp.Workbooks.Open strDest
set wb = XlApp.Workbooks(1)
wb.Activesheet.Range("A1:C4").Select
xlApp.Selection.Font.Bold = True
wb.Close SaveChanges
xlApp.Quit
Added a little more code so you can see how to edit the sheet, save, close and quit the app. The font.Bold will have no effect if you save as a .txt file though, it's just there so you can see how to use the object model.
Bookmarks