$all=guictrlread($input1)+guictrlread($input2)+guictrlread($input3)+...........
至于WORD方面 可以参考下word的UDF
也可以参考下面的word表格例子Const $NUMBER_OF_ROWS = 1
Const $NUMBER_OF_COLUMNS = 3
$objWord = ObjCreate("Word.Application")
$objWord.Visible = 1
$objDoc = $objWord.Documents.Add()
$objRange = $objDoc.Range()
$objDoc.Tables.Add ($objRange, $NUMBER_OF_ROWS, $NUMBER_OF_COLUMNS)
$objTable = $objDoc.Tables(1)
$objTable.Cell(1, 1).Range.Text = "Service Name"
$objTable.Cell(1, 2).Range.Text = "Display Name"
$objTable.Cell(1, 3).Range.Text = "Service State"
$x = 2
$strComputer = "."
$objWMIService = _
ObjGet("winmgmts:\" & $strComputer & "\root\cimv2")
$colItems = $objWMIService.ExecQuery("Select * from Win32_Service")
For $objItem in $colItems
$objTable.ROWS.Add()
$objTable.Cell($x, 1).Range.Text = $objItem.Name
$objTable.Cell($x, 2).Range.Text = $objItem.DisplayName
$objTable.Cell($x, 3).Range.Text = $objItem.State
$x = $x + 1
Next
$objTable.AutoFormat(9)
|