Visible

構文
Application.Visible
引数
戻値

プログラム実行例

ExcelからWordを起動する

CONST xlMicrosoftWord = 1

DIM Excel = CREATEOLEOBJ("Excel.Application")
Excel.Visible = TRUE

// Wordを起動
Excel.Application.ActivateMicrosoftApp(xlMicrosoftWord)

DIM ID = GETID("Microsoft Word", "OpusApp")
SLEEP(5.000)

// Wordを閉じる
CTRLWIN(ID, CLOSE)
Excel.Quit
  1. script.function.CREATEOLEOBJ(3)
  2. com.Excel.Application.Visible(4)
  3. com.Excel.Application.ActivateMicrosoftApp(7)
  4. script.function.GETID(9)
  5. script.function.SLEEP(10)
  6. script.function.CTRLWIN(13)
  7. com.Excel.Application.Quit(14)

アクティブセルに文字列を入力する

DIM Excel = CREATEOLEOBJ("Excel.Application")
Excel.Visible = TRUE
Excel.Workbooks.Add()

DIM Range = Excel.Application.ActiveCell
SLEEP(1.000)
Range.Value = "abc"
SLEEP(3.000)

Excel.Application.DisplayAlerts = FALSE
Excel.Quit
  1. script.function.CREATEOLEOBJ(1)
  2. com.Excel.Application.Visible(2)
  3. com.Excel.Workbooks.Add(3)
  4. com.Excel.Application.ActiveCell(5)
  5. script.function.SLEEP(6,8)
  6. com.Excel.Range.Value(7)
  7. com.Excel.Application.DisplayAlerts(10)
  8. com.Excel.Application.Quit(11)

アクティブシート名を取得する

DIM Excel = CREATEOLEOBJ("Excel.Application")
Excel.Visible = TRUE
Excel.Workbooks.Add()

DIM Worksheet = Excel.Application.ActiveSheet
PRINT Worksheet.Name

Excel.Application.DisplayAlerts = FALSE
Excel.Quit
  1. script.function.CREATEOLEOBJ(1)
  2. com.Excel.Application.Visible(2)
  3. com.Excel.Workbooks.Add(3)
  4. com.Excel.Application.ActiveSheet(5)
  5. com.Excel.Worksheet.Name(6)
  6. com.Excel.Application.DisplayAlerts(8)
  7. com.Excel.Application.Quit(9)

アクティブプリンターの名前を取得

DIM Excel = CREATEOLEOBJ("Excel.Application")
Excel.Visible = TRUE

PRINT Excel.Application.ActivePrinter

Excel.Application.DisplayAlerts = FALSE
Excel.Quit
  1. script.function.CREATEOLEOBJ(1)
  2. com.Excel.Application.Visible(2)
  3. com.Excel.Application.ActivePrinter(4)
  4. com.Excel.Application.DisplayAlerts(6)
  5. com.Excel.Application.Quit(7)
結果
Brother DCP-J963N Printer on Ne03:

スタートアップフォルダのパスを取得

DIM Excel = CREATEOLEOBJ("Excel.Application")
Excel.Visible = TRUE

PRINT Excel.Application.StartupPath

//Excel.Application.DisplayAlerts = FALSE
//Excel.Quit
  1. script.function.CREATEOLEOBJ(1)
  2. com.Excel.Application.Visible(2)
  3. com.Excel.Application.StartupPath(4)
  4. com.Excel.Application.DisplayAlerts(6)
  5. com.Excel.Application.Quit(7)
結果
C:\Users\akita\AppData\Roaming\Microsoft\Excel\XLSTART