Shell Function

āĻĒā§āĻ°ā§Ÿā§‹āĻœāĻ¨āĻŦā§‹āĻ§ā§‡, āĻ…āĻ¨ā§āĻ¯ āĻāĻ•āĻŸāĻŋ āĻ…ā§āĻ¯āĻžāĻĒā§āĻ˛āĻŋāĻ•ā§‡āĻļāĻ¨ āĻļā§āĻ°ā§ āĻ•āĻ°āĻž āĻšā§Ÿ āĻāĻŦāĻ‚ āĻ¸āĻ‚āĻļā§āĻ˛āĻŋāĻˇā§āĻŸ āĻ‰āĻ‡āĻ¨ā§āĻĄā§‹ āĻļā§ˆāĻ˛ā§€ āĻ¨āĻŋāĻ°ā§āĻ§āĻžāĻ°āĻŖ āĻ•āĻ°āĻž āĻšā§ŸāĨ¤

Syntax:

Shell (Pathname As String[, Windowstyle As Integer[, Param As String[, bSync]]])

Parameters:

āĻĒāĻžāĻĨā§‡āĻ° āĻ¨āĻžāĻŽ

Name of the program that you want to start, optionally with complete path and/or arguments.

āĻ‰āĻ‡āĻ¨ā§āĻĄā§‹āĻļā§ˆāĻ˛ā§€

Optional integer expression that specifies the style of the window that the program is executed in.

note

Parameter Windowstyle is only effective on Windows systems. On other systems the parameter is ignored.


The following values are possible:

Windowstyle

Meaning

0

āĻ—ā§‹āĻĒāĻ¨ āĻĒā§āĻ°ā§‹āĻ—ā§āĻ°āĻžāĻŽ āĻ‰āĻ‡āĻ¨ā§āĻĄā§‹āĻ¤ā§‡ āĻĢā§‹āĻ•āĻžāĻ¸āĨ¤

Not implemented in LibreOffice.

1

āĻ†āĻĻāĻ°ā§āĻļ āĻ†āĻ•āĻžāĻ°ā§‡āĻ° āĻĒā§āĻ°ā§‹āĻ—ā§āĻ°āĻžāĻŽ āĻ‰āĻ‡āĻ¨ā§āĻĄā§‹āĻ¤ā§‡ āĻĢā§‹āĻ•āĻžāĻ¸āĨ¤

Not implemented in LibreOffice.

2

āĻ¨ā§āĻ¯ā§‚āĻ¨āĻ¤āĻŽ āĻŦāĻŋāĻ¸ā§āĻ¤āĻžāĻ°āĻŋāĻ¤ āĻĒā§āĻ°ā§‹āĻ—ā§āĻ°āĻžāĻŽ āĻ‰āĻ‡āĻ¨ā§āĻĄā§‹āĻ¤ā§‡ āĻĢā§‹āĻ•āĻžāĻ¸āĨ¤

3

āĻĒā§‚āĻ°ā§āĻŖ āĻŦāĻŋāĻ¸ā§āĻ¤āĻžāĻ°āĻŋāĻ¤ āĻĒā§āĻ°ā§‹āĻ—ā§āĻ°āĻžāĻŽ āĻ‰āĻ‡āĻ¨ā§āĻĄā§‹āĻ¤ā§‡ āĻĢā§‹āĻ•āĻžāĻ¸āĨ¤

4

āĻĢā§‹āĻ•āĻžāĻ¸ āĻŦā§āĻ¯ā§ŸāĻ¤āĻŋāĻ¤ āĻ†āĻĻāĻ°ā§āĻļ āĻ†āĻ•āĻžāĻ°ā§‡āĻ° āĻĒā§āĻ°ā§‹āĻ—ā§āĻ°āĻžāĻŽ āĻ‰āĻ‡āĻ¨ā§āĻĄā§‹āĨ¤

Not implemented in LibreOffice.

6

āĻ¨ā§āĻ¯ā§‚āĻ¨āĻ¤āĻŽ āĻŦāĻŋāĻ¸ā§āĻ¤āĻžāĻ°āĻŋāĻ¤ āĻĒā§āĻ°ā§‹āĻ—ā§āĻ°āĻžāĻŽ āĻ‰āĻ‡āĻ¨ā§āĻĄā§‹, āĻ¸āĻ•ā§āĻ°āĻŋāĻ¯āĻŧ āĻ‰āĻ‡āĻ¨ā§āĻĄā§‹āĻ¤ā§‡ āĻĢā§‹āĻ•āĻžāĻ¸ āĻŦāĻŋāĻĻā§āĻ¯āĻŽāĻžāĻ¨āĨ¤

Not implemented in LibreOffice.

10

āĻĒā§‚āĻ°ā§āĻŖ-āĻĒāĻ°ā§āĻĻāĻž āĻĒā§āĻ°āĻĻāĻ°ā§āĻļāĻ¨ā§€āĨ¤


note

Windowstyle 3 and 10 are equivalent in Windows systems.


āĻĒā§āĻ¯āĻžāĻ°āĻžāĻŽāĻŋāĻŸāĻžāĻ°

String that specifies additional arguments passed to the program.

bSync

āĻ¯āĻĻāĻŋ āĻāĻ‡ āĻŽāĻžāĻ¨āĻŸāĻŋ true āĻšāĻ¯āĻŧ, āĻ¤āĻžāĻšāĻ˛ā§‡ Shell āĻ•āĻŽāĻžāĻ¨ā§āĻĄ āĻāĻŦāĻ‚ āĻ¸āĻ•āĻ˛ LibreOffice āĻ•āĻžāĻœ āĻāĻ‡ shell āĻĒā§āĻ°āĻ•ā§āĻ°āĻŋāĻ¯āĻŧāĻž āĻ¸āĻŽā§āĻĒāĻ¨ā§āĻ¨ āĻ¨āĻž āĻšāĻ“āĻ¯āĻŧāĻž āĻĒāĻ°ā§āĻ¯āĻ¨ā§āĻ¤ āĻ…āĻĒā§‡āĻ•ā§āĻˇāĻž āĻ•āĻ°ā§‡ āĻĨāĻžāĻ•ā§‡āĨ¤ āĻ¯āĻĻāĻŋ āĻŽāĻžāĻ¨ false āĻšāĻ¯āĻŧ, āĻ¤āĻžāĻšāĻ˛ā§‡ āĻ¸āĻ°āĻžāĻ¸āĻ°āĻŋ shell āĻĒā§āĻ°āĻĻāĻžāĻ¨ āĻ•āĻ°ā§‡ āĻĨāĻžāĻ•ā§‡āĨ¤ āĻĄāĻŋāĻĢāĻ˛ā§āĻŸ āĻŽāĻžāĻ¨ āĻšāĻ˛ā§‹ falseāĨ¤

Error codes:

5 Invalid procedure call

53 File not found 53 File not found

73 Feature not implemented

Example:


Sub ExampleShellForWin
    Shell("c:\windows\calc.exe",2)
End Sub

Please support us!