views:

175

answers:

1

I'm writing an add-in for PowerPoint, and want to get the text from the current slide in the editing window. The following works, but only when the slide is selected in the slide selector pane.

xSelection := PowerPointApp.ActiveWindow.Selection;
if xSelection.Type = ppSelectionSlides then
begin
  xSlide := xSelection.SlideRange.Item(1);
end;

I've been chasing my tail at MSDN trying to work out what the correct way to find out the current slide is. The DocumentWindow doesn't seem to have a current slide.

+4  A: 

Have you looked at

ActiveWindow.View.Slide.SlideIndex

This link is useful http://support.microsoft.com/kb/163194

Shaji
Many thanks. I don't actually need to go all the way to the SlideIndex - the slide object is what I needed. Thanks.
mj2008