Options

Need help in running exe file from Navision

Aravindh_NavisionAravindh_Navision Member Posts: 258
Hi Friends,

I need to run an rece1.exe file (from Navision) which fetches a text file and sends to another application. For that I used the following variable and code in menuitem's OnPush() trigger and tried to run it. It throws an warning while running it. I have attanched the warning that I get. Can anyone help me where I am going wrong?
Name          DataType          Subtype
------------------------------------------------------------------------------
WSHShell    Automation	        'Windows Script Host Object Model'.WshShell	
WinStyle	 Variant		

OnPush()
---------
IF ISCLEAR(WSHShell) THEN BEGIN
  CREATE(WSHShell);
  WinStyle := 1;
  WSHShell.Run('C:\Program Files\WSFEV1\rece1.exe',WinStyle);
  CLEAR(WSHShell);
END;

Thanks in advance,
Aravindh

Answers

Sign In or Register to comment.