Thursday, July 24, 2014

Speed up your Macros



Today I delivered a Webinar on Macros for GPUG. I loved doing it, but there are so many things to cover that an hour just doesn’t do it justice. I talked about adding the ShowAdvancedMacroMenu=TRUE switch to your Dex.ini file to reveal additional functionality that can make macros a lot more robust. No new software to buy, just an extra line (called a switch) in the Dex.ini file.

Even with this switch, a macro still can’t throw up dialog boxes with yes/no/never mind buttons on it, but you can make your macros run significantly faster using this tool. It speeds them up to run at least twice as fast. This is especially useful if you’re doing large imports or mass changes. Macros running under this mode took half the time of others. For longer macros, it was even more astonishing.

After you add the above switch to your Dex.ini file, the Advanced Macro menu becomes an option on your Macro menu. Once you update your Dex.ini file, your menu will look like this:

Advanced Macro Menu

All of the goodies are in the Status window. Pictured below is the Status window. I’ll go through this window and point out the things that I like to use.


Below I’ll try to define each of the items numbered above:

1. Shows you the name of the macro currently being recorded and what line it’s on.

2. Shows you the name of the macro currently being played, and what line it’s on.

3. This is the magic checkbox that turbo charges your macro. Checking this box turns off the complete redraw and hides the interface flash thereby making the macro run twice (at least) as fast.

4. The line in the macro you want to jump to. This is a great way to find out what was going on when your macro fails at line 7463 for example. You can put that value in this field and the results will display in the scrolling window at the bottom. You can also restart a macro to begin playing at the jump to line.

5. The number of lines to display in the scrolling window.

6. Indicate where you want the macro to pause while it’s playing. This is a good way to debug the macro or stop it from executing after a certain point is reached

7. The actual lines of the macro according to the lines displayed.

The easiest way to make this feature work is to click on the ellipses [. . .]button and browse for your macro file.


Once the macro is loaded, check the No User Interface Flash checkbox and then press the OK button. Your macro will launch running at lightening speed!

If there’s interest out there, I can go through each of the menu items on the Macro menu and the Advanced Macro and explain how to use it and what it does.

Until next time,



Mahmood M. Alsaadi said...

Ms. Leslie
This is such a great article. I have been working on an Excel-based macro generator for journal entries and analytical accounting details. The information posted in here have absolutely made a difference.

Your efforts are highly appreciated,

MarkW101 said...

Great stuff Leslie, as always. I like to MailMerge my Macros and use them to load data into places where you can't run integrations. I also use AutoIT which is keyboard macro tool for any application, as well as GP. I wish I could turn-off the GP flash in that application.

Dynamics Confessor said...

Hi Mark,
Can you use AutoIT to write a macro that will launch the Advanced Macro Menu Status window and check the box to turn off the user interface flash? I'll need to look up this AutoIT product.
Kind regards,

Kirk Livermont said...

Hi Leslie,
Do you have any experience with the No User Interface Flash option not working? I can't seem to get it to have any effect in my system.