Turn off Auto Correct Features through VBA?

B

Brian McCullough

How do i turn of Auto Correct features through VBA?

More specifically, I would like to find out if the following option is
turned on:

Tools->AutoCorrect Options->AutoFormat As You Type tab->"Straight Quotes"
with "Smart Quotes"

If this option is selected, I would like to temporarily turn it off through
code.

Can anyone explain how this is done?

Thanks!

Brian
 
J

Jay Freedman

Hi, Brian,

You should save the user's current setting, turn off the quotes, do your
work, and then restore the user's setting, as follows:

Dim bReplaceQuotes As Boolean
bReplaceQuotes = Options.AutoFormatAsYouTypeReplaceQuotes
Options.AutoFormatAsYouTypeReplaceQuotes = False

' do your stuff

Options.AutoFormatAsYouTypeReplaceQuotes = bReplaceQuotes
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top