How to use SendKey using automation on Nav Server

I want to use a send-key functionality using Automation on Nav 2013 and getting a below error.

Any Idea about how to create automation variable to nav server.


Microsoft Dynamics NAV Development Environment


You cannot create an Automation object “WSHShell” on Microsoft Dynamics NAV Server. You must create it on a client computer.


OK


Welcome to DUG!!!

Look at following blog

http://techblog.byllemos.com/2008/01/sendkeys-in-navision/

You need to instantiate the automation with OnClient parameter = TRUE.

Here’s an example of usage in NAV 2013: http://dynamicsuser.net/blogs/mark_brummel/archive/2009/12/16/tip-25-update-header-page-from-the-line-page.aspx