Print a List of AutoText Entries

P

paulag1955

Is it possible to print a listing of all the autotext entries in the normal
template and if so, can someone give me a push in the right direction? Also,
is it possible to store entries in a template other than the normal template?

Thanks,
Paula
 
J

Jonathan West

paulag1955 said:
Is it possible to print a listing of all the autotext entries in the
normal
template and if so, can someone give me a push in the right direction?
Also,
is it possible to store entries in a template other than the normal
template?


The AutoTextEntries collection is a property of any Template object. Each
AutoTextEntry has a Name property. You can iterate through the collection
and read the Name of each one. If you want the Normal template specifically,
that is the NormalTemplate object.

If you want to add an Autotext entry to a template other then Normal.dot by
hand, then make sure you have the right template open. Select the text you
want to include in the Autotext entry. Go to Insert, AutoText, AutoText.
Click the AutoText tab of the dialog that appears. Then choose your template
in the Look In box at the bottom. Then type in the name you want for the
AutoText entry and click Add.

To add an Autotext entry using code, use the Add method of the
AutoTextEntries collection of any template.


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
 
J

Jay Freedman

Go to http://jay-freedman.info and download the AutoTextDumper and
AutoTextLoader templates. The code and comments in the templates
should answer your questions.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
 
P

paulag1955

You guys are really good, unfortunately you read what I actually wrote rather
than what I meant! I really meant AutoCorrect entires...is that possible?

Paula
 
G

Greg Maxey

Something like this:

Sub WriteACEntries()
Dim oAC As AutoCorrectEntry
For Each oAC In Application.AutoCorrect.Entries
Selection.InsertAfter "Correct: " & oAC.Name & " with: " _
& oAC.Value & vbCr
Next
Selection.Collapse wdCollapseStart
End Sub
 
J

Jay Freedman

Greg said:
Something like this:

Sub WriteACEntries()
Dim oAC As AutoCorrectEntry
For Each oAC In Application.AutoCorrect.Entries
Selection.InsertAfter "Correct: " & oAC.Name & " with: " _
& oAC.Value & vbCr
Next
Selection.Collapse wdCollapseStart
End Sub

Or get the AutoCorrect.dot template from
http://word.mvps.org/FAQs/Customization/ExportAutocorrect.htm, which does
essentially the same thing to create a document containing the AutoCorrect
entries.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
P

paulag1955

This worked perfectly, thanks! Do you happen to know if it is possible to
store AutoCorrect entries in a template other than the Normal template?
Don't seem to be able to do i t with the organizer.

Thanks again!
 
G

Greg Maxey

Read the article at the link Jay sent. You will then realize that
autocorrect entries are not stored in a template.
 

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

Top