Mucha experiencia no tengo, pero lo que si te puedo decir que en COMMAND te viene un string que vos podes desarmar y luego podes usar cada una de las opciones.
a ver si me explico:
Código:
Public Function Command2Arg() As Integer
On Error GoTo TratarError
'Devuelve lo que hay en command$ o en la variable de entrada
'en un array global Argv() y devuelve el número de parámetros
'o cero si no hay ninguno
'-------------------------------------------------------------
Dim c As String
Dim sTmp As String
Dim i As Integer
Dim Separadores As String
Separadores = "/ " & Chr$(34) & Chr$(9)
ReDim argv(0)
argc = 0
sCommand = Trim$(CStr(Command$))
'Si no tiene nada la variable devolver cero
If (Len(sCommand) = 0) Then
Command2Arg = 0
argc = 0
MsgBox "Argumentos no validos" & vbCrLf & "Avisar a Sistemas", vbCritical, "Error"
Exit Function
End If
i = 0
Do While i < Len(sCommand)
i = i + 1
c = Mid$(sCommand, i, 1)
If c = Chr$(34) Then
sTmp = ""
Do While i < Len(sCommand)
i = i + 1
c = Mid$(sCommand, i, 1)
If c = Chr$(34) Then Exit Do
sTmp = sTmp & c
Loop
argc = argc + 1
ReDim Preserve argv(argc)
argv(argc) = Trim$(sTmp)
sTmp = ""
ElseIf c = "/" Or c <> " " Then
sTmp = c
Do While i < Len(sCommand)
i = i + 1
c = Mid$(sCommand, i, 1)
If InStr(Separadores, c) Then
i = i - 1
Exit Do
End If
sTmp = sTmp & c
Loop
argc = argc + 1
ReDim Preserve argv(argc)
argv(argc) = Trim$(sTmp)
sTmp = ""
End If
Loop
Command2Arg = argc
'Open "\datos\sendmail.LOG" For Append As #1
'Write #1, Now(), Environ("USUARIO"), sCommand
'Close #1
Exit Function
TratarError:
Open "\datos\sendmail.err" For Append As #1
Write #1, Now(), Environ("USUARIO"), Err.Number, Err.Description, Err.Source, "LINEA DE COMANDOS", sCommand
Close #1
MsgBox "Error:" & Err.Number & " " & Err.Description & vbCr & " Avisar a Sistemas", vbCritical, "Error en la Aplicacion"
End Function espero te sirva