Hi, Andrew,
If you're seeing all the autotext entries in your list, then you missed the
part (step 6 in the procedure I linked to) about creating a new style
specifically for the AutoTextList and applying it to the new entries. You're
getting the entries for the Normal style instead.
To do a dialog box (called a UserForm in MS-speak), see
http://www.mvps.org/word/FAQs/Userforms/CreateAUserForm.htm. After you get
the hang of that, using text box controls, you'll need to know how to set up
a list box:
- From the Controls toolbox, select the List Box control and drag a
rectangle on the userform.
- In the code pane, there are two dropdown lists just below the toolbar. In
the left-hand one, select UserForm. Then in the right-hand one, select
Initialize. This creates two lines in the code:
Private Sub UserForm_Initialize()
End Sub
Between those lines, type in lines like these:
ListBox1.AddItem "Retired"
ListBox1.AddItem "Employee"
ListBox1.AddItem "Self employed"
Each line adds the words in quotes into the list, in the order shown in the
code. (There is no automatic sorting.)
In step 10 of the procedure, change the code to this (assuming that there's
a bookmark named Employment in the document where the text is supposed to be
pasted in):
With ActiveDocument
.Bookmarks("Employment").Range _
.InsertBefore ListBox1.Value
End With
UserForm1.Hide
(Note: a lot of people miss the fact that there's a space between Range and
the underscore, and leaving it out causes an error.)