Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Speed Typing type program but better for MS Word

Status
Not open for further replies.

davegmail

IS-IT--Management
Joined
Jun 4, 2006
Messages
186
Location
US
is ok but I recall something even better.

Basically the idea is to use abbreviations - to rapidly type text then later expand all of them with one command. This is similar to search & replace but better. Not one at a time.

Any ideas? Thanks, Dave
 
1. What is wrong with one-at-a-time via AutoCorrect?

2. How flexible does this have to be? By that I mean, what exactly are you picturing in terms of being able to add other abbreviations = words?

Gerry
My paintings and sculpture
 
Just want to add, that unless VERY well designed, I can not see how anything like this would be more efficient than AutoCorrect. Just for my own curiousity I have been exdperimenting with a text file file of abbreviations = words...sort of OK, but not as fast as AutoCorrect.

If you are talking about a few words (say...< 50), then using anything other than AutoCorrect seems silly.

Why exactly you do want this? What exactly is the business case for this?

Gerry
My paintings and sculpture
 
This technique is very used in some programming environments, but also in normal offices.

Auto-correct will not allow you the same type of flexibility, as it requires that you type the start of the string you are trying to use while the use of abreviations does not.

The link dave gave has a good example of it, with their "fcc3" expanding to a long line, or with "sng1" expanding to 5 lines of text. These examples are not possible with Auto-correct as far as I know.

This type of things on a office are usefull if the number of long "common" phrases used on the "normal" documents is reasonable, but where the disposition/number of times used/conditions where is used do not warrant or suit the development of solution based on VB/VBA together with word templates where the user is only requested to enter the variable information.

I did see other products for Word, but I do not remember what they were.

Regards

Frederico Fonseca
SysSoft Integrated Ltd
 
Here is a sort of solution.

Make the text you want AutoText. Say one is:

This is some text. It has a space between it.

And it continues here for whatever.

Blah blah blah.[/color red]

Save it as AutoText "nft".

Now make another entry.

This is some other blah blah text. It has a bunch of space between paragraphs.



And it continues here for whatever.

Blah blah blah.[/color red]

Save it as Autotext "nft2".

Now:
Code:
Sub TestAutoText()
Dim oAT As AutoTextEntry
Dim oWord
On Error Resume Next
For Each oWord In ActiveDocument.Content.Words
   oWord.Select
   NormalTemplate.AutoTextEntries(oWord).Insert _
    Where:=Selection.Range
Next
End Sub
So type "nft", then nft2". Then run the code. This will go through each word and try to exchange (replace) it with an Autotext entry. Any words (text) that do not have matching AutoText will be ignored - actually, they won't be ignored, but will generate errors that will resume.

This is not particularly efficient, as it will parse every word. If you give more details on what you are wanting to use for abbreviations it may help. For example, are thse abbreviations going to be IN paragraphs, or are they going to BE paragraphs. If they are going to BE paragraphs, then the code could be made more efficient by parsing only paragraphs, not words.

Gerry
My paintings and sculpture
 
Of course, it would be much better if these were NOT in normal.dot.

In which case you would use:
Code:
Set myTemplate = ActiveDocument.AttachedTemplate
   myTemplate.AutoTextEntries(oWord).Insert _
    Where:=Selection.Range




Gerry
My paintings and sculpture
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top