Word 365 Normal.dotm

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)
}

 

 

 

Sorry, posted by error …