web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Dynamics GP 2015 "Macro command not found."

(0) ShareShare
ReportReport
Posted on by

My company gets hundreds of credit memos a day from a particular vendor.  Instead of manually auto applying each one we have been using a macro.  The macro we use has been successfully in place for a few months now with no errors.  Now all of a sudden we started getting the error "Macro command not found. (Line #2)."  We can't figure out why it is happening.  Nothing has changed with the macro and we haven't made any updates or dictionary changes.  Below is a sample of the macro code.  It's simply this code repeated for each open credit memo from this vendor.  We tested and tried removing everything expect the first two lines, and the macro runs fine with no errors.  It doesn't do anything of course because the first two lines just check for a window, but it runs without an error message.  Once we replace the other lines though we get the error.  We tried restarting the system thinking it was maybe a memory leak problem, but that did not fix the issue.  We are not sure what to try next any thoughts or suggestions would be greatly appreciated. 

##################################
CheckActiveWin dictionary 'default' form 'PM_Apply_To_Maintenance' window 'PM_Apply_Document'
NewActiveWin dictionary 'default' form 'PM_Apply_To_Maintenance' window 'PM_Apply_Document'
MoveTo field 'Vendor ID'
TypeTo field 'Vendor ID' , '19099'
MoveTo field 'Document Number'
MoveTo field 'Document Type' item '2' # 'CREDIT MEMO'
ClickHit field 'Document Type' item 2 # 'CREDIT MEMO'
MoveTo field 'Document Number'
TypeTo field 'Document Number' , '0170-241261'
MoveTo field 'Auto Apply Button'
ClickHit field 'Auto Apply Button'

*This post is locked for comments

I have the same question (0)
  • Tim Foster Profile Picture
    8,515 on at

    How is the Macro being generated?  If you are using Word, I'm wondering if a hidden character has been introduced into your template.  Turn on the show paragraph marks option to see.

    You might be able to see it if you open your .mac file in Notepad++ with the show all characters option (like paragraph marks in word).

    Check your input file (Excel?) for single quotes.

    Tim

  • Community Member Profile Picture
    on at

    Hello Tim. Thanks for the response.  The macro is generated by a SQL script.  Manually creating the macro would be just as tedious as auto applying each credit memo.  The results of the script are then copied into Notepad++ and saved as a .mac file, so I'm confident that isn't the problem.

  • Verified answer
    Tim W Profile Picture
    2,925 on at

    Starting with PM apply window open, I'm able to sub values into your macro and it runs for me.  I see that you stated you haven't made dictionary changes but wondering if you might have made security changes due to a modified window or have PA added or something else new to the mix.

    Error tells me that it could not open PM_Apply in the Dynamics.dic so wondering if security is pointing to a different dictionary.

    Macro1.jpg

    Next thing I would try is record a new macro manually and see if the values change.

  • Verified answer
    Community Member Profile Picture
    on at

    Thanks for the response.  I double checked to make sure, and there hasn't been any security changes or additional dictionaries added.  We tried manually creating the macro before which didn't work, but your suggestion gave me an idea.  I used the SQL script to generate the macro and instead of pasting it into the old macro I created a whole new .mac file and it worked.  There must be something about the original .mac file that was corrupted.  Thanks so much for your help.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
mtabor Profile Picture

mtabor 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans