Table of contents
TOC
Collapse the table of content
Expand the table of content

Selection.Type Property (Publisher)

office 365 dev account|Last Updated: 8/24/2017
|
3 Contributors

Returns a PbSelectionType constant that represents the selection type. Read-only.

Syntax

expression. Type

_expression_A variable that represents a Selection object.

Remarks

The Type property value can be one of these PbSelectionType constants.

| pbSelectionNone| | pbSelectionShape| | pbSelectionShapeSubSelection| | pbSelectionTableCells| | pbSelectionText|

Example

This example checks to see if the selection is text and if it is, makes the selected text bold.

Sub IfCellData() 
 Dim rowTable As Row 
 If Selection.Type = pbSelectionText Then 
 Selection.TextRange.Font.Bold = msoTrue 
 End If 
End Sub
© 2018 Microsoft