You can use Microsoft ActiveX controls (ActiveX control: A control, such as a check box or button that offers options to users or runs macros or scripts that automate a task. You can write macros for the control in Microsoft Visual Basic for Applications or scripts in Microsoft Script Editor.) on the Control Toolbox toolbar (toolbar: A bar with buttons and options that you use to carry out commands. To display a toolbar, press ALT and then SHIFT+F10.) to add more powerful functionality to a form (form: A document that contains fill-in blanks, or form fields, in which you enter information. For example, you can create an online registration form in Microsoft Word that uses drop-down lists from which users can select entries.) that users will complete in Microsoft Word. To work with these controls, a knowledge of Microsoft Visual Basic for Applications (VBA) is recommended.
- On the View menu, point to Toolbars, and then click Control Toolbox.
- Using the Control Toolbox toolbar, insert the ActiveX controls you want.
When you click a control, Word automatically switches to design time (design time: The time during which you create and modify the design of the objects and code in your application. For example, you design custom dialog boxes and controls. In contrast, during run time, you interact with the program as a user would.) and inserts the control.
- To set properties (property: A named attribute of a control, a field, or an object that you set to define one of the object's characteristics (such as size, color, or screen location) or an aspect of its behavior (such as whether the object is hidden).) for the selected control, click Properties
on the Control Toolbox toolbar.
- To write macros (macro: An action or a set of actions that you can use to automate tasks. Macros are recorded in the Visual Basic for Applications programming language.) in Visual Basic for Applications that customize the behavior of the control, double-click the control to display the Microsoft Visual Basic editor.
Notes
- The controls on the Control Toolbox toolbar do not function in many browsers (browser: Software that interprets HTML files, formats them into Web pages, and displays them. A Web browser, such as Microsoft Internet Explorer, can follow hyperlinks, transfer files, and play sound or video files that are embedded in Web pages.), so it is recommended that you use them for forms that will be filled out in Word, not for Web forms.
- Before you make a form available to users, protect it by clicking Protect Form
on the Forms
toolbar. Protection allows users to fill in the form but prevents them from changing the form's layout and its standard elements. When you want to go back to writing or modifying the form, click Protect Form
again to unprotect the form.