Command line syntax

You can automate VBA Plug by calling it from the command line.

vbaplug.exe ["input" ["outputdir"]] [/A | /E | /M:"macro.pam"] [/Q]

input
Specify an Office file to read. If input specifies an Office application name, the program will connect to this application instead of reading a disk file. Valid Office application names are ACCESS, EXCEL, POWERPOINT, VISIO, WORD.

outputdir
Specify an output directory. If no directory is specified, a temporary directory will be created.

Switches

The switches /A /E /M are optional and alternative to each other. If you don't specify any of them, VBA Plug waits for user input instead of proceeding automatically.

/A
Export and analyze. Export the VBA projects and run Project Analyzer. Includes all referenced VBA projects.

/E
Export. The same as /A but does not run Project Analyzer.

/M:"macro.pam"
Export and run macro. Export the VBA projects and run a Project Analyzer macro file.
Tip: The macro can refer to the exported .vbp or .vbg filename as %1. Start your macro.pam like this: Analyze "%1"

/Q
Quit VBA Plug after /A, /E or /M has completed. No effect if none of the other options is given.

Sample command lines

vbaplug.exe "C:\Data\Sales.mdb" /A /Q
Exports the VBA code in Sales.mdb to a temporary directory. VBA Plug then quits and Project Analyzer runs to analyze the exported code.

vbaplug.exe "C:\Data\Customers.xls" /E
Exports the VBA code in Sales.mdb to a temporary directory. VBA Plug stays running, Project Analyzer does not run.

vbaplug.exe "C:\Data\Budget.pps" "C:\Output\BudgetVBA"
Sets the input file to Budget.pps and the output directory to BudgetVBA. Does not start the export, however, but stays waiting for user input.

vbaplug.exe WORD /M:"c:\mymacro.pam" /Q
Connects to Word (which must be running already) and exports all the VBA projects in it. VBA Plug then quits and Project Analyzer executes mymacro.pam.

© Project Analyzer Help