Dominik Springer 3 年 前
コミット
5f9be46256

+ 5 - 0
microsoft/ms-office/auto-correction.csv

@@ -0,0 +1,5 @@
+"term","replacement"
+"Gerard","Gérard"
+"Tamas","Tamás"
+"Erno","Ernő"
+"pA","proALPHA"

+ 16 - 0
microsoft/ms-office/auto-correction.ps1

@@ -0,0 +1,16 @@
+# Sets auto-replacements for Microsoft Office
+
+# Get objects
+$word = New-Object -ComObject word.application
+$word.visible = $false
+$entries = $word.AutoCorrect.entries
+
+Import-Csv .\auto-correction.csv | ForEach-Object {
+    $entries.add($($_.term), $($_.replacement))
+}
+
+# Clean up
+$word.Quit()
+$word = $null
+[gc]::collect()
+[gc]::WaitForPendingFinalizers()