Hi All,

I am trying to incorporate a list box in MS word.

for eg the list box contains with check box:
A1
B1
C1
D1
E1....

I will be selecting more than one item say A1,C1 and E1.

To accomplish this I have written a macro in VBA, Here is the code.

VB Code:
  1. Private Sub Document_Open()
  2. ListBox1_Click
  3. End Sub
  4.  
  5. Private Sub ListBox1_Click()
  6.  Me.ListBox1.AddItem "A1"
  7.  Me.ListBox1.AddItem "B1"
  8.  Me.ListBox1.AddItem "C1"
  9.  Me.ListBox1.AddItem "D1"
  10.  Me.ListBox1.AddItem "E1"
  11.  Me.ListBox1.AddItem "F1"
  12.  Me.ListBox1.AddItem "G1"
  13.  Me.ListBox1.AddItem "H1"
  14.  Me.ListBox1.AddItem "I1"
  15.  Me.ListBox1.AddItem "K1"
  16.  Me.ListBox1.AddItem "L1"
  17.  Me.ListBox1.AddItem "M1"
  18. End Sub

I saved the word document as XXX.doc and closed.Then when I try again opening XXX.doc, the previous changes are not retained.


How can I accomplish to retain the pervious changes whenever I try to open the document.

Any help will appreciated.

Thanks,