Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Fredrik E. Nilsen Fredrik E. Nilsen is offline
external usenet poster
 
Posts: 108
Default Create several autotext entries

Hi,

I'm not sure if this should be in the vba-group. Is there a way to add
several autotext entries automatically? Lets say I have written a few
pages and I want to get all all words with more than 6 letters as
autotext enties, without doing it manually with each word.

--
mvh
Fredrik E. Nilsen
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Cindy M. Cindy M. is offline
external usenet poster
 
Posts: 2,416
Default Create several autotext entries

Hi Fredrik,

I'm not sure if this should be in the vba-group. Is there a way to add
several autotext entries automatically? Lets say I have written a few
pages and I want to get all all words with more than 6 letters as
autotext enties, without doing it manually with each word.

Yes, this belongs in the VBA group. And yes, it should be possible. Very
roughly:

Sub BatchAutoText()
Dim templ as Word.Template
Dim doc as Word.Document
Dim wrd as Word.Range

'Specify the "container"
Set templ = NormalTemplate
Set doc = ActiveDocument
For each wrd in doc.Words
If Len(wrd) = 6 Then
templ.AutoTextEntries.Add wrd.Text & "_AT", wrd
End If
Next
End Sub

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :-)

  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Tony Jollans Tony Jollans is offline
external usenet poster
 
Posts: 1,308
Default Create several autotext entries

What exactly do you hope to gain by this? You will end up with a lot of
autotexts that will be, for the most part, harder to use than just typing
the words.

--
Enjoy,
Tony

"Fredrik E. Nilsen" wrote in message
...
Hi,

I'm not sure if this should be in the vba-group. Is there a way to add
several autotext entries automatically? Lets say I have written a few
pages and I want to get all all words with more than 6 letters as
autotext enties, without doing it manually with each word.

--
mvh
Fredrik E. Nilsen



  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Fredrik E. Nilsen Fredrik E. Nilsen is offline
external usenet poster
 
Posts: 108
Default Create several autotext entries

On Fri, 22 Sep 2006 11:10:21 +0100, "Tony Jollans" my forename at my
surname dot com wrote:

What exactly do you hope to gain by this? You will end up with a lot of
autotexts that will be, for the most part, harder to use than just typing
the words.


Yes. I'm aware of that. I've just been asked if it is possible. Open
Office has this feature built in and it drives me nuts if it it turned
on. It can on the other hand be useful if you are writing a document
with several long and difficult words. Make a new document, type (or
copy - paste) the words you want as autotext, run the macro. Make
them available in your template and you're done.

--
Fredrik E. Nilsen
  #5   Report Post  
Posted to microsoft.public.word.docmanagement
Fredrik E. Nilsen Fredrik E. Nilsen is offline
external usenet poster
 
Posts: 108
Default Create several autotext entries

On Fri, 22 Sep 2006 11:21:46 +0200, Cindy M.
wrote:

Sub BatchAutoText()
Dim templ as Word.Template
Dim doc as Word.Document
Dim wrd as Word.Range

'Specify the "container"
Set templ = NormalTemplate
Set doc = ActiveDocument
For each wrd in doc.Words
If Len(wrd) = 6 Then
templ.AutoTextEntries.Add wrd.Text & "_AT", wrd
End If
Next
End Sub


Ah, thank you very much, I will try it.

--
Fredrik E. Nilsen


  #6   Report Post  
Posted to microsoft.public.word.docmanagement
Suzanne S. Barnhill Suzanne S. Barnhill is offline
external usenet poster
 
Posts: 33,624
Default Create several autotext entries

I think what you would want here, then, would be AutoCorrect entries rather
than AutoText.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Fredrik E. Nilsen" wrote in message
...
On Fri, 22 Sep 2006 11:10:21 +0100, "Tony Jollans" my forename at my
surname dot com wrote:

What exactly do you hope to gain by this? You will end up with a lot of
autotexts that will be, for the most part, harder to use than just typing
the words.


Yes. I'm aware of that. I've just been asked if it is possible. Open
Office has this feature built in and it drives me nuts if it it turned
on. It can on the other hand be useful if you are writing a document
with several long and difficult words. Make a new document, type (or
copy - paste) the words you want as autotext, run the macro. Make
them available in your template and you're done.

--
Fredrik E. Nilsen


Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
My AutoText side menus do not work. How do I active the side menu Blessedbev Microsoft Word Help 11 June 26th 06 11:18 PM
autotext entries including underlining Tipuana Microsoft Word Help 4 June 17th 06 08:00 PM
Create a drop-down list of autotest entries Perplexed Microsoft Word Help 1 March 26th 06 11:51 PM
Maintaining style formatting in AutoText entries taminator Microsoft Word Help 1 February 8th 06 10:51 AM
Restore Autotext entries Christina Microsoft Word Help 2 December 13th 05 11:18 PM


All times are GMT +1. The time now is 12:27 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"