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!
|
|
0
|
|
|
|
Reply
|
Robert
|
5/21/2010 10:18:09 PM |
|
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@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!
>
>
>
|
|
0
|
|
|
|
Reply
|
Jay
|
5/22/2010 12:39:34 AM
|
|
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@gmail.com> wrote in message
news:FEDJn.20580$gv4.18362@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!
>
>
>
|
|
0
|
|
|
|
Reply
|
Doug
|
5/22/2010 12:50:24 AM
|
|
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@REMOVECAPSmvps.org> wrote in message
news:C14B4C03-D7A9-4EF6-9352-3F54B3D8B019@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.
>
|
|
0
|
|
|
|
Reply
|
Robert
|
5/22/2010 9:06:20 AM
|
|
You can add them from a table - see
http://word.mvps.org/FAQs/Customization/ExportAutocorrect.htm or in the case
of Word 2007/10, there's an updated version at http://jay-freedman.info/.
Create a new document from the template and it will prompt to backup or
restore the entries - choose the backup option and modify the table it
creates to include your new entries, then use the restore option to add
them..
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
"Robert Crandal" <nobody@gmail.com> wrote in message
news:i8NJn.20488$mi.4214@newsfe01.iad...
> 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@REMOVECAPSmvps.org> wrote in message
> news:C14B4C03-D7A9-4EF6-9352-3F54B3D8B019@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.
>>
>
|
|
0
|
|
|
|
Reply
|
Graham
|
5/22/2010 11:22:23 AM
|
|
|
4 Replies
330 Views
(page loaded in 0.099 seconds)
|