Running an exe from Within X++

Is it possible to call an exe from within X++? I need to print a barcode using an existing barcode print system which is probably best achieved by using a button and having the X++ Override method call the exe.

Hi Pete,

You can use shellExecute function in WinApi class. An example -

static void StartWinExplorer(Args _args)
{
FileName Exe;
FileName DirOpen;
;
Exe = “C:\WINDOWS\explorer.exe”;
DirOpen = “C:\Windows”;
WinApi::shellExecute( Exe, DirOpen );

}

Best wishes,

Thanks. Easy really!