In PowerPoint, in "normal" view, the window is split into two panes, with a pane showing slide thumbnails on the left, and a pane showing the current slide on the right. You can select more than one slide in the left-hand panel, which is useful if you want to copy, move or delete slides.
To tell which slide(s) are currently selected in the left-hand panel, you can use ActiveWindow.Selection.SlideRange
. However, if you click between slides in the left-hand (thumbnail) panel, you end up with an insertion point, and:
ActiveWindow.Selection.Type
is zero (ppSelectionNone
).ActiveWindow.Selection.SlideRange
gives an error.
I have a question in two halves:
- How can I detect this situation? (Presumably there are other cases where the selection type is "none").
- How can I tell where the insertion point is, so that I can insert new slides at that point?
Either VBA or VSTO code would be fine :-)