Get number of currently active slide

C

Clevedog

I am designing an add-in in which I need to insert a small picture into the
currently active slide at design-time, not during a presentation or show.


Here is the full method:

Globals.ThisAddIn.Application.ActivePresentation.Slides[Globals.ThisAddIn.Application.SlideShowWindows[1].View.Slide.SlideIndex].Shapes.AddPicture("c:\\studentStatus.jpg", Microsoft.Office.Core.MsoTriState.msoFalse,
Microsoft.Office.Core.MsoTriState.msoTrue,
5, 5, 100, 50);

I get an integer out of range, 1 is not in the valid range of 1 to 0 from
this part of the code:
Globals.ThisAddIn.Application.SlideShowWindows[1].View.Slide.SlideIndex

I am new to the powerpoint object model, does anyone have another idea I
should try?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top