The following VBA example shows how a macro file can be started from VBA. This particular example will close Microsoft Dynamics GP when the Check Links window closes. As macros wait for background processes to complete, the macro will not start until the Check Links process and report have completed.
The code will create a text file with a .mac extension with the appropriate macro language command to exit Microsoft Dynamics GP as though the user selected File >> Exit. It then runs the macro file. To make this possible we are executing pass through Dexterity sanScript using the Continuum Integration Library.
NOTE: This customisation uses a method of executing Dexterity sanScript code from VBA which is unsupported by Microsoft.
Example code for v8.0, v9.0 & v10.0 is attached at the bottom of the article.
Please see the “Installation Instructions.txt” file in each version’s archive for more information.