Edit styles for AutoText entries

  • Thread starter Michael Hoja via OfficeKB.com
  • Start date
M

Michael Hoja via OfficeKB.com

Using Word XP VBA or VB, how can I programmatically edit all existing
autotext entries' styles in Normal.dot?

i.e we have two separate .dot's each containing a few hundred AutoText
entries all in Times New Roman size 12. The company document styles have
changed and as a result I need to change all the AutoText entries of these
templates to Arial size 10.

Please could someone help, I've been looking for months to find a way to do
this.

Much appreciated,
Michael
 
D

Doug Robbins

Try something like:

Dim ate As AutoTextEntry
For Each ate In NormalTemplate.AutoTextEntries
ActiveDocument.Range.InsertAfter ate.Value
ActiveDocument.Range.Font.Name = "Arial"
ActiveDocument.Range.Font.Size = 10
ActiveDocument.Range.Select
NormalTemplate.AutoTextEntries.Add Name:=ate.Name,
Range:=Selection.Range
Selection.Delete
Next ate

--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
 
M

Michael Hoja via OfficeKB.com

Thanks Doug! That worked a treat - I knew it wouldn't get to some of the
entries with paragraphs but it sorted most of them. Much appreciated the
assist.

Cheers,

Michael
 

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