Share via


DocumentWindow.Selection Property

Returns a PpSelectionType object that represents the selection in the specified document window. Read-only.

Namespace:  Microsoft.Office.Interop.PowerPoint
Assembly:  Microsoft.Office.Interop.PowerPoint (in Microsoft.Office.Interop.PowerPoint.dll)

Syntax

'Declaration
ReadOnly Property Selection As Selection
    Get
'Usage
Dim instance As DocumentWindow
Dim value As Selection

value = instance.Selection
Selection Selection { get; }

Property Value

Type: Microsoft.Office.Interop.PowerPoint.Selection
Selection

Examples

If there's text selected in the active window, this example makes the text italic.

With Application.ActiveWindow.SelectionIf .Type = ppSelectionText Then

        .TextRange.Font.Italic = True

    End If

End With

See Also

Reference

DocumentWindow Interface

DocumentWindow Members

Microsoft.Office.Interop.PowerPoint Namespace