Document.ToggleFormsDesign Method

Word Developer Reference

Switches form design mode on or off.

Syntax

expression.ToggleFormsDesign

expression   Required. A variable that represents a Document object.

Remarks

When Microsoft Office Word is in form design mode, the Control Toolbox toolbar is displayed. You can use this toolbar to insert Microsoft ActiveX controls such as command buttons, scroll bars, and option buttons. In form design mode, event procedures do not run, and when you click an embedded control, the control's sizing handles appear.

Example

This example switches to form design mode if the Control Toolbox toolbar is not currently displayed.

Visual Basic for Applications
  If CommandBars("Control Toolbox").Visible = False Then
    ActiveDocument.ToggleFormsDesign
End If

See Also