Slide number, SlideID, SlideIndex and all that jazz
PowerPoint numbers slides in several ways and it pays to know the difference.
When you create a new slide, it gets a unique SlideID, a unique number that's read-only ... you can't change it manually or programmatically. Reordering the slides won't cause it to change. Once a slide is created, it keeps the same SlideID forever.
SlideIndex is the ordinal number of the slide in the presentation as it's currently arranged. Move a slide around in slide sorter and its SlideIndex changes to reflect its new position in the show.
In other words, if the slide is the tenth one in the show, its SlideIndex is 10.
SlideNumber is the number that appears on printouts. Normally, it's the same as SlideIndex, but if you've change the starting slide number (in File, Page Setup) then SlideNumber = SlideIndex + (Starting Slide Number - 1)
You can use the FindBySlideID method to get a reference to the slide with SlideID XXX (and from that reference, get the SlideIndex if needed). See VBA Help for FindBySlideID for more details and some example code.