Hi,
I want to open an external mail client (e.g. Outlook) in NAV.
In the CC I use the automaition WSHShell and everything works fine.
For the RTC I tried to use the DotNet Sys.Diagnostic.Process, but nothing happens...
Has anyone an idea?
Here's my code:
Automation: com_WSHShell - 'Windows Script Host Object Model'.WshShell
DotNet: dtn_process - 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.System.Diagnostics.Process
I want to open an external mail client (e.g. Outlook) in NAV.
In the CC I use the automaition WSHShell and everything works fine.
For the RTC I tried to use the DotNet Sys.Diagnostic.Process, but nothing happens...
Has anyone an idea?
Here's my code:
Automation: com_WSHShell - 'Windows Script Host Object Model'.WshShell
DotNet: dtn_process - 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.System.Diagnostics.Process
IF ISSERVICETIER THEN BEGIN dtn_process := dtn_process.Process; dtn_process.StartInfo.UseShellExecute := FALSE; dtn_process.StartInfo.FileName := 'rundll32.exe'; dtn_process.StartInfo.Arguments := 'url.dll,FileProtocolHandler mailto:'+toAddress+'?subject='+subject; dtn_process.StartInfo.CreateNoWindow := FALSE; dtn_process.Start(); CLEAR(dtn_process); END ELSE BEGIN IF ISCLEAR(com_WSHShell) THEN CREATE(com_WSHShell); com_WSHShell.Run('rundll32.exe url.dll,FileProtocolHandler mailto:'+toAddress+'?subject='+subject); END;