by davehook at 2012-08-21 03:49:16
Hi,by surveyor at 2012-08-21 10:15:02
Im kinda new to powershell and need your help! Im using powershell to create a MS Word document and output an SQL query into a table in that document. The first question is how do i set the page orientation to Landscape and, for the table, how do i set the table to Autofit to window?
Many thanks for your time
Hi,by davehook at 2012-08-22 02:03:09
you can use this to switch to landscape
[script=powershell]$Word = New-Object -ComObject Word.Application
$Word.Visible = $true
$Word.Documents.Add("Normal",$false,0,$true)
$Word.Selection.PageSetup.Orientation = [Microsoft.Office.Interop.Word.WdOrientation]]
Thanks, that worked for the orientationby surveyor at 2012-08-22 03:23:33
Can you explain, what you mean with autofit to windows for the table?by davehook at 2012-08-22 06:44:50
Basically i want the table to be 100% width of the pageby RichLec at 2012-08-23 09:54:16
This might give you a little help… http://blogs.technet.com/b/heyscripting … fonts.aspx