Export (0) Print
Expand All

options Property

Office 2003

FpSearchOptions can be one or more of the following FpSearchOptions constants.

fpSearchIgnoreWhitespace
fpSearchMatchAlef
fpSearchMatchCase
fpSearchMatchDiacritics
fpSearchMatchKashida
fpSearchRegExp
fpSearchReviseHangul
fpSearchWholeWord

expression.options

expression    Required. An expression that returns a SearchInfo object.

Returns an IHTMLElementCollection collection that represents the OPTION elements for a SELECT element.

expression.options

expression    Required. An expression that returns one of the objects in the Applies To list.

Example

The following example searches for all occurrences of lower case "the" and capitalizes the first letter.

        Dim objSearch As SearchInfo

Set objSearch = Application.CreateSearchInfo

objSearch.Action = fpSearchReplaceAllText
objSearch.Find = "the"
objSearch.Options = fpSearchMatchCase
objSearch.ReplaceWith = "The"

ActiveDocument.Find objSearch
      

The following example sets the value attribute and the displayed list text for the first OPTION element in the first SELECT element in the active document.

        Dim objSelect As IHTMLSelectElement
Dim objOption As IHTMLOptionElement

Set objSelect = ActiveDocument.all.tags("select").Item(0)
Set objOption = objSelect.Options(0)

objOption.Value = "cat"
objOption.Text = "cat"
      




Show:
© 2014 Microsoft