The command line arguments passed to the application on startup are accessible through the application arguments collection MWOffice.Arguments. Each white-space delimited command-line argument is available as a argument object in the collection. The Argument.Value property contains the value of that argument. For example, the following script prints a list of the arguments passed to the application to the debug output window.

 ' Code Module
Sub Main
        Dim arg As Argument

        Debug.Clear
        For Each arg In Arguments
                Debug.Print arg.Value
        Next arg
End Sub

 

Running this script I get the following output:

e:\MWO_Dev\Debug\MWOffice.exe
f
MWO-229

Here the application located at 'e:\MWO_Dev\Debug\MWOffice.exe' has been started with the feature flag '-f' and provided with the feature 'MWO-229' indicating I want to run the 229 version of Microwave Office.