alanrenouf
08-04-2008, 08:08 AM
Hi,
Im integrating VBA code into powershell to write a table of information out to a word doc, it works but when I perform the following code:
$msWord = New-Object -Com Word.Application
$wordDoc = $msWord.Documents.Add()
$docTable = $wordDoc.Tables.Add($wordDoc.Application.Selection.Range,$contents.Count,$c olumnCount)
$doctable.Rows.Add()
The last line (Rows.Add()) outputs on my powershell console the following...
Range : System.__ComObject
Application : Microsoft.Office.Interop.Word.ApplicationClass
Creator : 1297307460
Parent : System.__ComObject
AllowBreakAcrossPages : -1
Alignment : 0
HeadingFormat : 0
SpaceBetweenColumns : 10.8
Height : 9999999
HeightRule : 0
LeftIndent : 0
IsLast : True
IsFirst : False
Index : 3
Cells : {, }
Borders : {System.__ComObject, System.__ComObject, System.__Co
mObject, System.__ComObject...}
Shading : System.__ComObject
Next :
Previous : System.__ComObject
NestingLevel : 1
ID
Is there anyway to stop this information being shown ?
Im integrating VBA code into powershell to write a table of information out to a word doc, it works but when I perform the following code:
$msWord = New-Object -Com Word.Application
$wordDoc = $msWord.Documents.Add()
$docTable = $wordDoc.Tables.Add($wordDoc.Application.Selection.Range,$contents.Count,$c olumnCount)
$doctable.Rows.Add()
The last line (Rows.Add()) outputs on my powershell console the following...
Range : System.__ComObject
Application : Microsoft.Office.Interop.Word.ApplicationClass
Creator : 1297307460
Parent : System.__ComObject
AllowBreakAcrossPages : -1
Alignment : 0
HeadingFormat : 0
SpaceBetweenColumns : 10.8
Height : 9999999
HeightRule : 0
LeftIndent : 0
IsLast : True
IsFirst : False
Index : 3
Cells : {, }
Borders : {System.__ComObject, System.__ComObject, System.__Co
mObject, System.__ComObject...}
Shading : System.__ComObject
Next :
Previous : System.__ComObject
NestingLevel : 1
ID
Is there anyway to stop this information being shown ?