select Method

Microsoft FrontPage Visual Basic

select Method

Selects the text in the specified IHTMLTxtRange object.

expression.select

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

Example

The following example takes an FPHTMLDocument object, creates an IHTMLTxtRange object that represents the text in the specified document, selects the range, and then returns an IHTMLTxtRange object that represents the selection.

    Function SelectDocument(ByRef objDoc As FPHTMLDocument) As IHTMLTxtRange
    Dim objRange As IHTMLTxtRange
    
    Set objRange = objDoc.body.createTextRange
    objRange.Select
    
    Set SelectDocument = objRange
End Function
  

Use the following example to call the preceding function.

    Sub CallSelectDocument()
    Call SelectDocument(objDoc:=ActiveDocument)
End Sub