you can use a small Excel helper macro to .Open your 95-source and .SaveAs another format using a command line. You make use of the kernel32/GetCommandLine routine to get the cmdline arg's into your application.
To do this, create a workbook "Converter.xls" and insert the following code
module "ThisWorkbook"
Private Sub Workbook_Open()
Dim CmdRaw As Long, CmdLine As String, Idx As Integer
Dim MyFile As Workbook
CmdRaw = GetCommandLine
CmdLine = CmdToSTr(CmdRaw)
' Msgbox CmdLine
Idx = InStr(1, CmdLine, "/e/")
Set MyFile = Workbooks.Open(Mid(CmdLine, Idx + 3, 99))
MyFile.SaveAs "Test2003.xls", xlExcel7
Application.Quit
End Sub
module "Module1"
Declare Function GetCommandLine Lib "kernel32" Alias "GetCommandLineW" () As Long
Declare Function lstrlenW Lib "kernel32" (ByVal lpString As Long) As Long
Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (MyDest As Any, MySource As Any, ByVal MySize As Long)
Function CmdToSTr(Cmd As Long) As String
Dim Buffer() As Byte
Dim StrLen As Long
If Cmd Then
StrLen = lstrlenW(Cmd) * 2
If StrLen Then
ReDim Buffer(0 To (StrLen - 1)) As Byte
CopyMemory Buffer(0), ByVal Cmd, StrLen
CmdToSTr = Buffer
End If
End If
End Function
Finally, call this by command line from the path containing your 95-XLS
C:\Progra~1\Micros~2\OFFICE11\excel Converter.xls /e/test95.xls
test95.xls will be opened and saved as test2003.xls in the xlExcel7 format.
So far the basic tech ... now you can be creative adding a 2nd cmd line argument (seperated by "/" - parse more intelligently, etc etc
Important: Excel must run on "relaxed security" to avoid the Macro warning message at startup - however the warning msg is GREAT as long as you debug (Disable allows you to go back to your code ;-) )
I quick & dirty tested this on Excel2003
Hope that helps