Default Property

Microsoft Word Visual Basic

Show Default property as it applies to the CheckBox object.

Returns or sets the default check box value. True if the default value is checked. Read/write Boolean.

expression.Default

expression    Required. An expression that returns one of the above objects.

Show Default property as it applies to the DropDown object.

Returns or sets the default drop-down item. The first item in a drop-down form field is 1, the second item is 2, and so on. Read/write Long.

expression.Default

expression    Required. An expression that returns one of the above objects.

Show Default property as it applies to the TextInput object.

Returns or sets the text that represents the default text box contents. Read/write String.

expression.Default

expression    Required. An expression that returns one of the above objects.

Example

ShowAs it applies to the CheckBox object.

If the first form field in the active document is a check box, this example retrieves the default value.

Dim blnDefault As Boolean

If ActiveDocument.FormFields(1).Type = wdFieldFormCheckBox Then
    blnDefault = ActiveDocument.FormFields(1).CheckBox.Default
End If
				

ShowAs it applies to the DropDown object.

This example sets the default item for the drop-down form field named "Colors" in Sales.doc.

Documents("Sales.doc").FormFields("Colors").DropDown _
 .Default = 2
				

ShowAs it applies to the TextInput object.

This example sets the default text for the text form field named "Name."

ActiveDocument.FormFields("Name").TextInput.Default = _
 "your name"