Word 365 Normal.dotm

Welcome Forums General PowerShell Q&A Word 365 Normal.dotm

Viewing 1 reply thread
  • Author
    Posts
    • #198344
      MvW
      Participant
      Topics: 11
      Replies: 13
      Points: 124
      Rank: Participant

      Hi Guy’s,

      I try to modify MS Word 365’s Normal.dotm to set a default font and size, but when I start MS Word 365 there is a different default font and size.

       

      $Word = New-Object -ComObject Word.Application
      $Word.Visible = $false
      $NormalDot = “$($env:APPDATA)\Microsoft\Templates\Normal.dotm”
      If (Test-Path $NormalDot -PathType Leaf) {
      $Document = $Word.Documents.Open($NormalDot)
      $NormalDot = “$($env:APPDATA)\Microsoft\Templates\Normal.dotm”
      If (Test-Path $NormalDot -PathType Leaf) {
      $Document = $Word.Documents.Open($NormalDot)
      $Document.Styles(-1).Font.Name = “Arial”
      $Document.Styles(-1).Font.Size = ’18’
      $Document.Styles(-1).Font.SetAsTemplateDefault()
      $Document.Styles(-1).ParagraphFormat.SpaceAfter = ‘0’
      $Document.Styles(-1).ParagraphFormat.LineSpacingRule = [Microsoft.Office.Interop.Word.WdLineSpacing]::wdLineSpaceSingle
      $Document.Close(-1)
      }

       

       

       

    • #198353
      Participant
      Topics: 7
      Replies: 122
      Points: 592
      Helping Hand
      Rank: Major Contributor

      Sorry, posted by error ….

      • This reply was modified 8 months, 1 week ago by TonyD05. Reason: Posted by error
Viewing 1 reply thread
  • The topic ‘Word 365 Normal.dotm’ is closed to new replies.