Outlook 2016 - disable auto correct across the board

donmontalvo
Esteemed Contributor III

Been getting requests for a quick way to disable all auto-correct in Outlook 2016.

Tried this but it doesn't work:

#!/bin/sh

over500=`dscl . list /Users UniqueID | awk '$2 > 500 { print $1 }'`

# Outlook
for u in $over500 ;
do
    /usr/bin/defaults write /Users/"$u"/Library/Containers/com.microsoft.Outlook/Data/Library/Preferences/com.microsoft.Outlook.plist Correct_capitalization_for_first_two_letters_of_a_word -bool false
    /usr/bin/defaults write /Users/"$u"/Library/Containers/com.microsoft.Outlook/Data/Library/Preferences/com.microsoft.Outlook.plist Capitalize_first_letter_of_first_word_in_sentence -bool false
    /usr/bin/defaults write /Users/"$u"/Library/Containers/com.microsoft.Outlook/Data/Library/Preferences/com.microsoft.Outlook.plist Capitalize_weekdays -bool false
    /usr/bin/defaults write /Users/"$u"/Library/Containers/com.microsoft.Outlook/Data/Library/Preferences/com.microsoft.Outlook.plist Automatically_create_bulleted_lists -bool false
    /usr/bin/defaults write /Users/"$u"/Library/Containers/com.microsoft.Outlook/Data/Library/Preferences/com.microsoft.Outlook.plist Automatically_create_numbered_lists -bool false
    /usr/bin/defaults write /Users/"$u"/Library/Containers/com.microsoft.Outlook/Data/Library/Preferences/com.microsoft.Outlook.plist Convert_dashes_into_mdash_and_ndashes -bool false
    /usr/bin/defaults write /Users/"$u"/Library/Containers/com.microsoft.Outlook/Data/Library/Preferences/com.microsoft.Outlook.plist Apply_bold_and_italics_using_asterisk_and_underline -bool false
    /usr/bin/defaults write /Users/"$u"/Library/Containers/com.microsoft.Outlook/Data/Library/Preferences/com.microsoft.Outlook.plist Automatically_create_URLs -bool false
    /usr/bin/defaults write /Users/"$u"/Library/Containers/com.microsoft.Outlook/Data/Library/Preferences/com.microsoft.Outlook.plist Automatically_create_ellipses -bool false
    /usr/bin/defaults write /Users/"$u"/Library/Containers/com.microsoft.Outlook/Data/Library/Preferences/com.microsoft.Outlook.plist Replace_3_or_more_asterisks_or_underlines_with_horizontal_line -bool false
    /usr/sbin/chown -R "$u" /Users/"$u"/Library/Containers/com.microsoft.Outlook/Data/Library/Preferences/com.microsoft.Outlook.plist
    /bin/chmod -R 700 /Users/"$u"/Library/Containers/com.microsoft.Outlook/Data/Library/Preferences/com.microsoft.Outlook.plist
    /usr/bin/killall -u "$u" cfprefsd
done

exit 0

On a side note, my TextEdit script to do the same is working fine:

#!/bin/sh

over500=`dscl . list /Users UniqueID | awk '$2 > 500 { print $1 }'`

# TextEdit
for u in $over500 ;
do
    /usr/bin/defaults write /Users/"$u"/Library/Containers/com.apple.TextEdit/Data/Library/Preferences/com.apple.TextEdit.plist SmartQuotes -bool false
    /usr/bin/defaults write /Users/"$u"/Library/Containers/com.apple.TextEdit/Data/Library/Preferences/com.apple.TextEdit.plist SmartDashes -bool false
    /usr/bin/defaults write /Users/"$u"/Library/Containers/com.apple.TextEdit/Data/Library/Preferences/com.apple.TextEdit.plist SmartLinks -bool false
    /usr/bin/defaults write /Users/"$u"/Library/Containers/com.apple.TextEdit/Data/Library/Preferences/com.apple.TextEdit.plist AutosaveDelay -bool false
    /usr/bin/defaults write /Users/"$u"/Library/Containers/com.apple.TextEdit/Data/Library/Preferences/com.apple.TextEdit.plist CheckGrammarWithSpelling -bool false
    /usr/bin/defaults write /Users/"$u"/Library/Containers/com.apple.TextEdit/Data/Library/Preferences/com.apple.TextEdit.plist CorrectSpellingAutomatically -bool false
    /usr/bin/defaults write /Users/"$u"/Library/Containers/com.apple.TextEdit/Data/Library/Preferences/com.apple.TextEdit.plist DataDetectors -bool false
    /usr/bin/defaults write /Users/"$u"/Library/Containers/com.apple.TextEdit/Data/Library/Preferences/com.apple.TextEdit.plist CheckSpellingWhileTyping -bool false
    /usr/bin/defaults write /Users/"$u"/Library/Containers/com.apple.TextEdit/Data/Library/Preferences/com.apple.TextEdit.plist ShowRuler -bool false
    /usr/bin/defaults write /Users/"$u"/Library/Containers/com.apple.TextEdit/Data/Library/Preferences/com.apple.TextEdit.plist SmartCopyPaste -bool false
    /usr/bin/defaults write /Users/"$u"/Library/Containers/com.apple.TextEdit/Data/Library/Preferences/com.apple.TextEdit.plist TextReplacement -bool false
    /usr/bin/defaults write /Users/"$u"/Library/Containers/com.apple.TextEdit/Data/Library/Preferences/com.apple.TextEdit.plist RichText -bool false
    /usr/bin/defaults write /Users/"$u"/Library/Containers/com.apple.TextEdit/Data/Library/Preferences/com.apple.TextEdit.plist AddExtensionToNewPlainTextFiles -bool false
    /usr/bin/defaults write /Users/"$u"/Library/Containers/com.apple.TextEdit/Data/Library/Preferences/com.apple.TextEdit.plist PreserveWhitespace -bool false
    /usr/sbin/chown -R "$u" /Users/"$u"/Library/Containers/com.apple.TextEdit/Data/Library/Preferences/com.apple.TextEdit.plist
    /bin/chmod -R 700 /Users/"$u"/Library/Containers/com.apple.TextEdit/Data/Library/Preferences/com.apple.TextEdit.plist
    /usr/bin/killall -u "$u" cfprefsd
done

exit 0

Thoughts?

TIA,
Don

ae72d833bbd74a9fb6a3647440eee584

--
https://donmontalvo.com
7 REPLIES 7

talkingmoose
Moderator
Moderator

I've looked at Outlook's plist file and I don't find any of those keys you're referencing in it.

Where'd you get these? Are they possibly lifted from an Outlook 2011 plist file?

donmontalvo
Esteemed Contributor III

Disabling all the auto-this-and-that results in:

$ defaults read /Users/username/Library/Containers/com.microsoft.Outlook/Data/Library/Preferences/com.microsoft.Outlook | grep Correct
    "Correct_capitalization_for_first_two_letters_of_a_word" = 0;
$ defaults read /Users/username/Library/Containers/com.microsoft.Outlook/Data/Library/Preferences/com.microsoft.Outlook | grep Capitalize
    "Capitalize_first_letter_of_first_word_in_sentence" = 0;
    "Capitalize_weekdays" = 0;
$ defaults read /Users/username/Library/Containers/com.microsoft.Outlook/Data/Library/Preferences/com.microsoft.Outlook | grep Automatically_create
    "Automatically_create_URLs" = 0;
    "Automatically_create_bulleted_lists" = 0;
    "Automatically_create_ellipses" = 0;
    "Automatically_create_numbered_lists" = 0;
$ defaults read /Users/username/Library/Containers/com.microsoft.Outlook/Data/Library/Preferences/com.microsoft.Outlook | grep Convert
    "Convert_dashes_into_mdash_and_ndashes" = 0;
$ defaults read /Users/username/Library/Containers/com.microsoft.Outlook/Data/Library/Preferences/com.microsoft.Outlook | grep Apply
    "Apply_bold_and_italics_using_asterisk_and_underline" = 0;
$ defaults read /Users/username/Library/Containers/com.microsoft.Outlook/Data/Library/Preferences/com.microsoft.Outlook | grep Replace
    "Replace_3_or_more_asterisks_or_underlines_with_horizontal_line" = 0;
$
--
https://donmontalvo.com

donmontalvo
Esteemed Contributor III

Got a request to combine into one, so...

#!/bin/sh
# Disable auto correct wherever possible.

over500=`dscl . list /Users UniqueID | awk '$2 > 500 { print $1 }'`

# Outlook
for u in $over500 ;
do
    /bin/echo "Disabling Microsoft Outlook 2016 auto-correct settings for "$u"..."
    /usr/bin/defaults write /Users/"$u"/Library/Containers/com.microsoft.Outlook/Data/Library/Preferences/com.microsoft.Outlook.plist Correct_capitalization_for_first_two_letters_of_a_word -bool false
    /usr/bin/defaults write /Users/"$u"/Library/Containers/com.microsoft.Outlook/Data/Library/Preferences/com.microsoft.Outlook.plist Capitalize_first_letter_of_first_word_in_sentence -bool false
    /usr/bin/defaults write /Users/"$u"/Library/Containers/com.microsoft.Outlook/Data/Library/Preferences/com.microsoft.Outlook.plist Capitalize_weekdays -bool false
    /usr/bin/defaults write /Users/"$u"/Library/Containers/com.microsoft.Outlook/Data/Library/Preferences/com.microsoft.Outlook.plist Automatically_create_bulleted_lists -bool false
    /usr/bin/defaults write /Users/"$u"/Library/Containers/com.microsoft.Outlook/Data/Library/Preferences/com.microsoft.Outlook.plist Automatically_create_numbered_lists -bool false
    /usr/bin/defaults write /Users/"$u"/Library/Containers/com.microsoft.Outlook/Data/Library/Preferences/com.microsoft.Outlook.plist Convert_dashes_into_mdash_and_ndashes -bool false
    /usr/bin/defaults write /Users/"$u"/Library/Containers/com.microsoft.Outlook/Data/Library/Preferences/com.microsoft.Outlook.plist Apply_bold_and_italics_using_asterisk_and_underline -bool false
    /usr/bin/defaults write /Users/"$u"/Library/Containers/com.microsoft.Outlook/Data/Library/Preferences/com.microsoft.Outlook.plist Automatically_create_URLs -bool false
    /usr/bin/defaults write /Users/"$u"/Library/Containers/com.microsoft.Outlook/Data/Library/Preferences/com.microsoft.Outlook.plist Automatically_create_ellipses -bool false
    /usr/bin/defaults write /Users/"$u"/Library/Containers/com.microsoft.Outlook/Data/Library/Preferences/com.microsoft.Outlook.plist Replace_3_or_more_asterisks_or_underlines_with_horizontal_line -bool false
    /usr/sbin/chown -R "$u" /Users/"$u"/Library/Containers/com.microsoft.Outlook/Data/Library/Preferences/com.microsoft.Outlook.plist
    /bin/chmod -R 700 /Users/"$u"/Library/Containers/com.microsoft.Outlook/Data/Library/Preferences/com.microsoft.Outlook.plist
    /usr/bin/killall -u "$u" cfprefsd
done

# TextEdit
for u in $over500 ;
do
    /bin/echo "Disabling TextEdit auto-correct settings for "$u"..."
    /usr/bin/defaults write /Users/"$u"/Library/Containers/com.apple.TextEdit/Data/Library/Preferences/com.apple.TextEdit.plist SmartQuotes -bool false
    /usr/bin/defaults write /Users/"$u"/Library/Containers/com.apple.TextEdit/Data/Library/Preferences/com.apple.TextEdit.plist SmartDashes -bool false
    /usr/bin/defaults write /Users/"$u"/Library/Containers/com.apple.TextEdit/Data/Library/Preferences/com.apple.TextEdit.plist SmartLinks -bool false
    /usr/bin/defaults write /Users/"$u"/Library/Containers/com.apple.TextEdit/Data/Library/Preferences/com.apple.TextEdit.plist AutosaveDelay -bool false
    /usr/bin/defaults write /Users/"$u"/Library/Containers/com.apple.TextEdit/Data/Library/Preferences/com.apple.TextEdit.plist CheckGrammarWithSpelling -bool false
    /usr/bin/defaults write /Users/"$u"/Library/Containers/com.apple.TextEdit/Data/Library/Preferences/com.apple.TextEdit.plist CorrectSpellingAutomatically -bool false
    /usr/bin/defaults write /Users/"$u"/Library/Containers/com.apple.TextEdit/Data/Library/Preferences/com.apple.TextEdit.plist DataDetectors -bool false
    /usr/bin/defaults write /Users/"$u"/Library/Containers/com.apple.TextEdit/Data/Library/Preferences/com.apple.TextEdit.plist CheckSpellingWhileTyping -bool false
    /usr/bin/defaults write /Users/"$u"/Library/Containers/com.apple.TextEdit/Data/Library/Preferences/com.apple.TextEdit.plist ShowRuler -bool false
    /usr/bin/defaults write /Users/"$u"/Library/Containers/com.apple.TextEdit/Data/Library/Preferences/com.apple.TextEdit.plist SmartCopyPaste -bool false
    /usr/bin/defaults write /Users/"$u"/Library/Containers/com.apple.TextEdit/Data/Library/Preferences/com.apple.TextEdit.plist TextReplacement -bool false
    /usr/bin/defaults write /Users/"$u"/Library/Containers/com.apple.TextEdit/Data/Library/Preferences/com.apple.TextEdit.plist RichText -bool false
    /usr/bin/defaults write /Users/"$u"/Library/Containers/com.apple.TextEdit/Data/Library/Preferences/com.apple.TextEdit.plist AddExtensionToNewPlainTextFiles -bool false
    /usr/bin/defaults write /Users/"$u"/Library/Containers/com.apple.TextEdit/Data/Library/Preferences/com.apple.TextEdit.plist PreserveWhitespace -bool false
    /usr/sbin/chown -R "$u" /Users/"$u"/Library/Containers/com.apple.TextEdit/Data/Library/Preferences/com.apple.TextEdit.plist
    /bin/chmod -R 700 /Users/"$u"/Library/Containers/com.apple.TextEdit/Data/Library/Preferences/com.apple.TextEdit.plist
    /usr/bin/killall -u "$u" cfprefsd
done

# System
/bin/echo "Disabling OS X auto-correct settings..."
/usr/bin/defaults write -g NSAutomaticQuoteSubstitutionEnabled -bool false
/usr/bin/defaults write -g NSAutomaticDashSubstitutionEnabled -bool false

# Finish
echo "Speelchucking disebbbled."

exit 0
--
https://donmontalvo.com

talkingmoose
Moderator
Moderator

Not sure what's happening here. You're pointing to the correct location for Outlook's plist. However, when I go to Outlook menu > Preferences > AutoCorrect and make all those changes (enabling as well as disabling), I never see those keys getting created in the plist.

I've made sure to quit Outlook between changes. I've made sure to verify the plist is updating when I quit by checking its timestamp. I just simply don't see those keys getting created.

Can you test a couple of things for me?

  1. Currently, your defaults read command is returning zero ( 0 ) for all those AutoCorrect options, which should mean they are all disabled. If you enable every option and re-read your plist, do the values change to one ( 1 )?
  2. Can you verify a plist from another machine (or a fresh OS X user account) shows those keys?

mm2270
Legendary Contributor III

These keys and values in the plist are showing up for me as well when I disable or enable those options. Just like Don listed. I haven't tried running a script similar to the one he posted to see if it actually does what its supposed to, but I will give that a shot when I have a moment and report back.

jaharmi
Contributor

I haven’t tried any of this with Outlook — but I did make a device-level configuration profile for the TextEdit settings. That successfully set the options — at least the ones I checked — for new TextEdit documents.

Caveat: I found that I could override and change the settings for a given document, so the YMMV if you want enforcement. The configuration profile settings were still selected as the defaults for each new document I created.

Clarification: the TextEdit settings were in the “com.apple.TextEdit” preference domain. I created a property list for that and converted it with MCXToProfile, then imported the configuration profile.

donmontalvo
Esteemed Contributor III

Thanks @jaharmi, there was mention on some admin forums of using Configuration Profiles to manage this, will try to give this a look when we come up for air.

--
https://donmontalvo.com