How can I change font spacing and footer formatting in a word document with Powershell? RRS feed

  • Question

  • $Word = New-Object -ComObject Word.Application;
    $Word.Visible = $true;
    $Doc = $Word.Documents.Add();
    $Section = $Doc.Sections.Item(1);
    $Header = $Section.Headers.Item(1);
    $Footer = $Section.Footers.Item(1);
    $Header.Range.Text = "abcd";
    $selection.Font.Name="Courier New";

    1.Even though I specified my font spacing as 1.0, it is taking a default value and it seems that this is not working. Do I need to make any changes?

    2.Is font spacing and line spacing same object .Whats the object for line spacing if not so?how to use that?

    3.Also, this displays the page number in the footer column i.e. 1 or 2 or 3 like this but I want it to be like Page 1, Page 2 ,Page 3. How do I do that?

    • Moved by Bill_Stewart Saturday, December 28, 2013 4:37 PM Moving to more appropriate forum
    Monday, September 23, 2013 6:08 AM

All replies