Re: Convert files from wr1. to xls
Re: Convert files from wr1. to xls
I copied the following from the archive of February 14, 2002
Does anyone have the code that was sent to D so I can convert my WR1 files to XLS ? (My WR1 files are files I created from Lotus Symphony in the mid 1980's.... Thanks
Posted by DK on February 14, 2002 9:31 AM
Here's code that will open all files in a specified folder and save them as Excel format. Let me know if you have any problems,
D
Option Explicit
Sub ConvertFiles()
'All WR1 files should be in the same folder in order for
'this code to work. There should be no other files other than
'the ones you want to convert.
Dim strFolder As String, lngFile As Long
'Change this to the folder containing the Wr1 files
strFolder = "C:\temp\wr1 files"
With Application.FileSearch
.NewSearch
.FileType = msoFileTypeAllFiles
.LookIn = strFolder
.Execute
For lngFile = 1 To .FoundFiles.Count
'Here's where you need to put the code to open the file and convert it
Workbooks.Open .FoundFiles(lngFile)
ActiveWorkbook.SaveAs "C:\temp\converted files\file" & lngFile, xlExcel7
ActiveWorkbook.Close
Next lngFile
End With
End Sub
Re: Convert files from wr1. to xls
I copied the following from the archive of February 14, 2002
Does anyone have the code that was sent to D so I can convert my WR1 files to XLS ? (My WR1 files are files I created from Lotus Symphony in the mid 1980's.... Thanks
Posted by DK on February 14, 2002 9:31 AM
Here's code that will open all files in a specified folder and save them as Excel format. Let me know if you have any problems,
D
Option Explicit
Sub ConvertFiles()
'All WR1 files should be in the same folder in order for
'this code to work. There should be no other files other than
'the ones you want to convert.
Dim strFolder As String, lngFile As Long
'Change this to the folder containing the Wr1 files
strFolder = "C:\temp\wr1 files"
With Application.FileSearch
.NewSearch
.FileType = msoFileTypeAllFiles
.LookIn = strFolder
.Execute
For lngFile = 1 To .FoundFiles.Count
'Here's where you need to put the code to open the file and convert it
Workbooks.Open .FoundFiles(lngFile)
ActiveWorkbook.SaveAs "C:\temp\converted files\file" & lngFile, xlExcel7
ActiveWorkbook.Close
Next lngFile
End With
End Sub