Article ID: 161390
Article Last Modified on 10/11/2006
Sub MySelection()
' Use to store a ppSelectionType.
Dim WhatIsSelected As Long
' Obtain the PpSelectionType constant.
WhatIsSelected = ActiveWindow.Selection.Type
' Display a message box indicating the current selection type.
Select Case WhatIsSelected
Case ppSelectionNone
MsgBox "Nothing is selected."
Case ppSelectionSlides
MsgBox "A slide is selected."
Case ppSelectionShapes
MsgBox "A shape is selected."
Case ppSelectionText
MsgBox "Text or a Text Box is selected."
Case Else
MsgBox "An error occurred."
End Select
End Sub
The following table shows the PpSelectionType constants and their values.
Property Value ----------------- ----- ppSelectionNone 0 ppSelectionSlides 1 ppSelectionShapes 2 ppSelectionText 3PpSelectionType constants are read-only long values, they cannot be modified.
176476 OFF: Office Assistant Not Answering Visual Basic Questions
163435 VBA: Programming Resources for Visual Basic for Applications
Additional query words: 97 8.00 kbmacro ppt8 vba vbe macppt mac_ppt ppt98 98 powerpt
Keywords: kbcode kbdtacode kbhowto kbmacro kbprogramming KB161390