WD: Sample WordBasic Macro to Type All AutoText Entries |
Q138966
The following macro inserts all the AutoText entries in Normal.dot into a
new document. The new document includes the name of each entry and
separates the entries with horizontal lines.
Note that you can quickly print a list of all AutoText entries by clicking
Print on the File menu, and choosing AutoText Entries in the Print What
box. (On Word for the Macintosh, the box is named Print.) It is not
necessary to use a macro for this method.
WARNING: ANY USE BY YOU OF THE CODE PROVIDED IN THIS ARTICLE IS AT YOUR OWN RISK. Microsoft provides this macro code "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.
Sub MAIN
FileNewDefault
n = CountAutoTextEntries()
For count = 1 To n
FormatBordersAndShading .TopBorder = 1
Bold 1
Insert AutoTextName$(count) + ":" + String$(2, 13)
FormatBordersAndShading .TopBorder = 0
Bold 0
EditAutoText .Name = AutoTextName$(count), .Insert
Insert Chr$(13) + Chr$(13)
Next
StartOfDocument
End Sub
Additional query words: entries
Keywords : kbdta kbmacroexample kbautotext winword macword word6 word7 word95
Issue type : kbinfo
Technology :
|
Last Reviewed: November 4, 2000 © 2001 Microsoft Corporation. All rights reserved. Terms of Use. |