ShellExecute - method of object Pm

Running or printing the file or the registered document.
ShellExecute(sOperation As String, sFile As String, sParameters As String, sFolder As String, nShow As Long) As Long
n = Pm.ShellExecute(sOperation, sFile, sParameters, sFolder, nShow)
sOperation(String) Type of operation with the file. If the parameter is empty text, then the value "open" is set.
"open" - The file has to be opened along with the associated application
"print" - The file has to be printed
sFile(String) The file name with the path. If a full path is not entered, then it is completed relatively according to the application file folder.

It is recommended to use the PROMOTIC path syntax - see PROMOTIC path to files and folders.

sParameters(String) Parameters that have to be passed to the application associated to the running file
sFolder(String) Path to the working folder of the application.

It is recommended to use the PROMOTIC path syntax - see PROMOTIC path to files and folders.

nShow(Long) Display mode of the application associated to the file:
0 - hidden
1 - normal active
2 - minimized active
3 - maximized active
4 - normal not active
6 - minimized not active
Return Values:
If the operation passed successfully, then the method returns the value 0, otherwise it returns the error number:
1 - out of memory
3 - the specified file has not been found
4 - the specified path has not been found
The method serves to running or printing a *.exe file or the file that is registered in the OS Windows along with the associated application.
This method is not functional for Web panels.
Print the text document "experiment.htm" in the Internet Explorer:
Pm.ShellExecute "print", "#app:experiment.htm", "", "#app:", 0
Display of the Windows system window for the network printer "\\SERVER\PRINTER1:"
Pm.ShellExecute "", "\\SERVER\PRINTER1", "", "", 0
Launching the PowerPoint application.
Pm.ShellExecute "open", "c:\Proj\presentation.pps", "", "c:\Proj\", 1
PROMOTIC 8.3.21 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
- Pm
- Abs
- Cos
- E
- Exp
- LN2
- PI
- Pow
- ShellExecute
- Sin
- Tan
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice