selection Property

Microsoft FrontPage Visual Basic

selection Property

Returns an IHTMLSelectionObject object that represents the currently selected text in Microsoft FrontPage.

expression.selection

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

Example

The following example creates a text range with the current selection and then collapses the range to paste a new empty paragraph into the document.

    Dim objRange As IHTMLTxtRange
Set objRange = ActiveDocument.Selection.createRange
objRange.collapse False
objRange.pasteHTML "<p>&nbsp;</p>"