Professional Documents
Culture Documents
Word Table
Word Table
objWord = WScript.CreateObject("Word.Application");
objWord.Visible = true;
objDoc = objWord.Documents.Add();
objRange = objDoc.Range();
objDoc.Tables.Add (objRange,1,3);
objTable = objDoc.Tables(1);
objWMIService = GetObject("winmgmts:\\\\.\\root\\cimv2");
colItems = new Enumerator(objWMIService.ExecQuery("Select * from Win32_Service"));
if (x > 1){
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++;
}