Monday, November 12, 2007

How to put drop down and radio buttons in MS WORD

This is my blog after a very very long time. Of late I am also involved in Documentation, which i have realized is as important as coding or any domain knowledge. You realize the significance of documentation if you see your higher ups. Their work mostly involves Documentation. Many people ignore this part only to learn it in the later part of their career. Here, I am giving two tips as to prepare a more flexible document using MS Word. It would be a plus if u know Visual Basic.

To put a drop down and fill the options:
  1. In the word document, fetch the control tool box.
  2. Drag a combo box(say name is ComboBox1); it ll be in design mode.
  3. Double click on that; it ll go visual basic editor.
  4. In the left pull down menu, choose document; in the right pull down menu, choose open.
  5. U ll get a method like:
Private Sub Document_New()

End Sub

6. Fill the contents of the method as follows( delete other methods):

Private Sub Document_open()
ComboBox1.AddItem "Select one"
ComboBox1.AddItem "ABAP"

ComboBox1.AddItem "BASIS"

ComboBox1.AddItem "BI/BW"

ComboBox1.AddItem "CO"

ComboBox1.AddItem "CRM"
ComboBox1.AddItem "FI"

ComboBox1.AddItem "HR/HCM/CATS"

ComboBox1.AddItem "MM"

ComboBox1.AddItem "PM"

ComboB
ox1.AddItem "PP"
ComboBox1.AddItem "PS"

ComboBox1.AddItem "SD"

ComboBox1.AddItem "XI"


End Sub

7. Now save it and run. 8. Go to the document and try the combo box, the contents would have got filled.

To put radio buttons:

  1. In the word document, fetch the control tool box.
  2. Drag a radio button; it ll be in design mode.
  3. Click on Properties on the control tool box.
  4. A pop up appears.
  5. In that, change the 'Caption' to watever option name u want.
  6. If u want that option to be selected, change 'Value' to true.
  7. Add how many ever radio buttons u want.

To use all these options, u have to enable macros.