LibreOffice 24.8 Help
如果需要,啟動其他應用程式並定義個別視窗樣式。
Shell (Pathname As String[, Windowstyle As Integer[, Param As String[, bSync]]])
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.
Parameter Windowstyle is only effective on Windows systems. On other systems the parameter is ignored.
The following values are possible:
| Windowstyle | Meaning | 
|---|---|
| 0 | 焦點位於隱入的程式視窗上。 | 
| 1 | 焦點位於標準大小的程式視窗上。 Not implemented in LibreOffice. | 
| 2 | 焦點位於最小化的程式視窗上。 | 
| 3 | 焦點位於最大化的程式視窗上。 | 
| 4 | 標準大小的程式視窗,無焦點。 Not implemented in LibreOffice. | 
| 6 | 最小化的程式視窗,焦點仍位於使用中的視窗上。 Not implemented in LibreOffice. | 
| 10 | 全螢幕顯示。 | 
Windowstyle 3 and 10 are equivalent in Windows systems.
String that specifies additional arguments passed to the program.
如果將此值設定為 true (真),則 Shell 指令和所有 LibreOffice 工作都將處於等待狀態,直到 shell 程序完成為止。如果將此值設定為 false (假),shell 將直接傳回結果。標準值是 false (假)。
Sub ExampleShellForWin
    Shell("c:\windows\calc.exe",2)
End Sub