Powershell and Word 2010

Welcome Forums General PowerShell Q&A Powershell and Word 2010

This topic contains 0 replies, has 1 voice, and was last updated by  Forums Archives 7 years, 2 months ago.

  • Author
  • #5026

    Points: 0
    Rank: Member

    by davehook at 2012-08-21 03:49:16

    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

    by surveyor at 2012-08-21 10:15:02

    you can use this to switch to landscape
    [script=powershell]$Word = New-Object -ComObject Word.Application
    $Word.Visible = $true
    $Word.Selection.PageSetup.Orientation = [Microsoft.Office.Interop.Word.WdOrientation]]

    by davehook at 2012-08-22 02:03:09

    Thanks, that worked for the orientation

    by 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 page

    by RichLec at 2012-08-23 09:54:16

    This might give you a little help.. http://blogs.technet.com/b/heyscripting ... fonts.aspx

The topic ‘Powershell and Word 2010’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort