Hi Matt,
A Userform is not required (although I tend to prefer them).
When you click the View Code button on the Control Toolbox while the combo
box is selected, what you get is misleading. You're being shown the code
procedure that will run when a user selects one of the items in the combo
box's list or types something into its box -- that's why the word "Change"
is in the procedure's name.
What you need to do instead is to write a procedure that runs when the
document is opened. To get that started, while the VBA editor is open, click
the dropdown at the top of the code window where it says "ComboBox1" and
choose "Document". VBA guesses wrong again and gives you a procedure named
Document_New (that's what runs when you use the File > New command to create
a new document from a template). Now click the other dropdown, which now
says "New", and select "Open". At last you have the procedure Document_Open
that you need.
Between "Private Sub Document_Open()" and "End Sub", put the kind of
statements that Hussain described.
You can delete the "Private Sub ComboBox1_Change()" and "Private Sub
Document_New()" lines and the "End Sub" lines that match them; or you can
just leave them there with no code inside them. Having an empty procedure is
almost the same as not having the procedure at all (it takes Word a few
milliseconds to "do nothing").
As a bit of background: Word doesn't save the items in a combo box's list
when it saves a document. Your code needs to rebuild that list every time
the document opens. That's why you have to use the Document_Open procedure.
For a lot more detail about the controls in the Toolbox, read
http://msdn2.microsoft.com/en-us/library/aa140269(office.10).aspx.
--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.