From: Robert Crandal on
I was wondering, can I install (or program) text-typing macros into
Word 2007? The type of macros that I am looking for are the
only commonly found in other text editors, such as Emacs on Unix.

For example, if someone types the string "zfbi" into a document,
I want Word to immediately convert this string to "Federal Bureau
of Investstigation. Or, "zwww" should be replaced with "World
Wide Web".

BTW, I have a master file of text strings (or macros) that I want
Word to recognize and replace with expanded strings. So, I'm
just wondering what's a good way to implement these macros using
VBA, if at all possible.

Thank you!




From: Jay Freedman on
Although it's possible to use macros for this, it's very
"un-Word-like". Word has two other features, AutoText and AutoCorrect,
that are intended for making text replacements. See
http://www.word.mvps.org/FAQs/Customization/AutoText.htm and
http://www.word.mvps.org/FAQs/Customization/AutoCorrect.htm for
discussions.

An alternative that works everywhere in Windows is a key assignment
program such as AutoHotKey (www.autohotkey.com).

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.


On Fri, 21 May 2010 15:18:09 -0700, "Robert Crandal"
<nobody(a)gmail.com> wrote:

>I was wondering, can I install (or program) text-typing macros into
>Word 2007? The type of macros that I am looking for are the
>only commonly found in other text editors, such as Emacs on Unix.
>
>For example, if someone types the string "zfbi" into a document,
>I want Word to immediately convert this string to "Federal Bureau
>of Investstigation. Or, "zwww" should be replaced with "World
>Wide Web".
>
>BTW, I have a master file of text strings (or macros) that I want
>Word to recognize and replace with expanded strings. So, I'm
>just wondering what's a good way to implement these macros using
>VBA, if at all possible.
>
>Thank you!
>
>
>
From: Doug Robbins - Word MVP on
You can define AutoCorrect entries that can be used for that purpose.

To do that, click on the Office button and then on Word Options and then on
Proofing and then on AutoCorrect Options and in the "Replace text as you
type" section of the AutoCorrect tab of the dialog, enter the phrase that
you want into "With:" control. Then enter the text that you want to be
replaced into the "Replace:" control and click on OK.

For example with "Federal Bureau of Investigation" in the "With:" control,
enter "zfbi" in the "Replace:" control then click on OK.

Repeat for as many items as you want.

The above instructions are for Word 2007. In Office 2003, you get to the
AutoCorrect Options dialog by accessing the Tools menu.



--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com

"Robert Crandal" <nobody(a)gmail.com> wrote in message
news:FEDJn.20580$gv4.18362(a)newsfe09.iad...
> I was wondering, can I install (or program) text-typing macros into
> Word 2007? The type of macros that I am looking for are the
> only commonly found in other text editors, such as Emacs on Unix.
>
> For example, if someone types the string "zfbi" into a document,
> I want Word to immediately convert this string to "Federal Bureau
> of Investstigation. Or, "zwww" should be replaced with "World
> Wide Web".
> BTW, I have a master file of text strings (or macros) that I want
> Word to recognize and replace with expanded strings. So, I'm
> just wondering what's a good way to implement these macros using
> VBA, if at all possible.
>
> Thank you!
>
>
>
From: Robert Crandal on
Great, that's what I needed. However, might there be a faster way to add
my
entries?? I have a couple hunded items that I want to be auto replaced and
I
would really hate to enter all entries manually.

Thank you!



"Doug Robbins - Word MVP" <dkr(a)REMOVECAPSmvps.org> wrote in message
news:C14B4C03-D7A9-4EF6-9352-3F54B3D8B019(a)microsoft.com...
>
> You can define AutoCorrect entries that can be used for that purpose.
>
> To do that, click on the Office button and then on Word Options and then
> on Proofing and then on AutoCorrect Options and in the "Replace text as
> you type" section of the AutoCorrect tab of the dialog, enter the phrase
> that you want into "With:" control. Then enter the text that you want to
> be replaced into the "Replace:" control and click on OK.
>
> For example with "Federal Bureau of Investigation" in the "With:" control,
> enter "zfbi" in the "Replace:" control then click on OK.
>
> Repeat for as many items as you want.
>
> The above instructions are for Word 2007. In Office 2003, you get to the
> AutoCorrect Options dialog by accessing the Tools menu.
>