Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / February 2005

Tip: Looking for answers? Try searching our database.

Edit styles for AutoText entries

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Michael Hoja - 02 Feb 2005 19:39 GMT
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
Doug Robbins - 03 Feb 2005 00:49 GMT
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

Signature

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

> Using Word XP VBA or VB, how can I programmatically edit all existing
> autotext entries' styles in Normal.dot?
[quoted text clipped - 10 lines]
> Much appreciated,
> Michael
Michael Hoja - 06 Feb 2005 12:16 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.