Selection.Type property (Publisher)
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 the PbSelectionType constants.
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
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.