This article has been archived. It is offered "as is" and will no longer be updated.
This article discusses how to create and how to run macros to perform various tasks in Microsoft Dynamics GP and in Microsoft Business Solutions - Great Plains. The macros can be used to automatically start the program, to generate reports, and to perform other tasks. This article also discusses how to use Scheduled Tasks to run the macros.
- To create and to run a macro that automatically generates reports or that performs other tasks, follow these steps:
- Start Microsoft Dynamics GP. Do not log on.
- In the Welcome to Microsoft Dynamics GP dialog box, press ALT+F8 to start recording the logon
macro. Name the macro, and then save it to the installation folder for Microsoft Dynamics GP.
Note If the macro is not in the installation folder, you will receive the following error message:
- In the Server box, click a server.
Note It is important to select the appropriate server when you create the macro, even if the correct server was selected when you started Microsoft Dynamics GP.
- In the User ID field, enter the appropriate information for the user who will generate the report or who will generate other tasks.
- It is important to do this step when you create the macro, even if the correct user ID is displayed when you start Microsoft Dynamics GP.
- To make sure that the desired user ID is recorded within the macro, we recommended that you delete any existing user ID from the field, move to the Password field, return to the User ID field, and then enter the desired ID.
- In the Password field, type the password for the user who is selected in step 1d.
- Click OK. The Company Login dialog box opens.
- From the Company list, click the company for which you want to log on, and then click OK.
Note It is important to select the appropriate company when you create the macro, even if the correct company is selected when the Company Login window opens.
- Complete all the steps that are required to process the reports or other tasks within this company.
- On the File menu, click Exit to close Microsoft Dynamics GP.
- Use a text editor, such as Notepad, to add the following line as the second line of the macro.Note This line prevents any message that is displayed by the macro from being displayed. Therefore,
such a message cannot prevent a logon to Microsoft Dynamics GP.
An example of such a message is the total run time of the macro. All messages that are generated by the macro are written to the
- To start Microsoft Dynamics GP by using the macro, create a batch file. To do this, follow these steps:
- Create a file that has a .bat file name extension. For example, create a file that is named DynamicsGP.bat.
- Use a text editor, such as Notepad, to open the batch file.
- Paste the following line into the .bat file.
Note Replace XXX.mac with the name of the macro file that you assigned in Step 1b. Replace Dynamics GP installation path with the installation path of Microsoft Dynamics GP on this computer. For example, type the following path:
dynamics dynamics.set XXX.mac cd c:\Dynamics GP installation path
Program Files\Microsoft Dynamics\GP
- Save the changes, and then close the batch file.
- Configure Scheduled Tasks to run the batch file that will run the macro that you created. For more information about how to use Scheduled Tasks, see the Windows manuals or Windows online documentation. To see the online documentation, click the following link:
Article ID: 856496 - Last Review: November 2, 2013 - Revision: 10.0
- Microsoft Dynamics GP 10.0
- Microsoft Dynamics GP 9.0
- Microsoft Business Solutions–Great Plains 8.0
- Microsoft Business Solutions–Great Plains 7.5
- System Manager
|kbnosurvey kbarchive kbhowto kbmbsmigrate KB856496||