AutoCorrect

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I find that AutoCorrect does not work on text that is pasted, on text that is
inserted, on text existing before the AutoCorrect is defned, or while the
macro recorder is on.

Is there a way of applying an AutoCorrect to the whole of the active document?
 
Unfortunately, no. AutoCorrect is triggered by *typing* a space or
punctuation, and it checks only the word(s) to the immediate left of the
cursor..

About the closest you can get is to click at the end of a word that you know
is an AutoCorrect entry, type a space, and then backspace. But this is a
one-at-a-time method only.

Although you can't record a macro of applying an AutoCorrect, it would be
possible to write a macro. Look in the VBA help for the topic on the
AutoCorrectEntry object and its .Apply method. However, since you have to
know which words in the document are AutoCorrect trigger values, you might
as well write the macro to use find/replace instead; it would run much more
quickly.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
AutoCorrect is specifically designed to work on an "as-you-type" basis. That
pretty much precludes any of the actions you listed except typing while
recording a macro. In that case the AutoCorrect feature is internally
disabled. Whether there is some means through VBA I don't know, but tend to
doubt it... at least for most of your points if not all.

Spell Check & good ol' proof-reading are far more reliable.
 
Thank you for confirming the workings of AutoCorrect. The background is this:

I have a mail merge document in which some fields have recurring values and
Word cannot cope with them. I changed the recurring values, concatenating the
items using caret (^), defined an AutoCorrect entry to change ^ to line feed.
It does not work except when I type ^. I am loathe to write a macro because
I'd like users to use whatever template they choose and the macro may not be
present in their particular template. Must find another solution!
 
What about Find & Replace? - Click the More button, then click the Special
button;

Find what: ^^ [Note: You need 2 carets because the caret is a
'special character']
Replace with: ^p -or- ^|

Or am I not clear on what you are asking?
 

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

Back
Top