Retrieving slide index in powerpoint

G

Guest

Hi all,

I want to know how to return the index for the currently selected slide(not
the slide show). Right now i'm using the code below to do that. But the
problem is I do not know how to get the index 'J' for slides.

TWord$ =
Globals.ThisAddIn.Application.ActivePresentation.Slides(J).Shapes(2).TextFrame.TextRange.Words(I).Text

Can someone show me the way on how to get the value for J? Thank you.

Regards,
Westman
 
D

David M. Marcovitz

J = ActiveWindow.Selection.SlideRange.SlideIndex maybe

Or, if the slideshow is currently running, you might try:

ActivePresentation.SlideShowWindow.View.Slide.Shapes
(2).TextFrame.TextRange.Words(I).Text


--
David M. Marcovitz
Microsoft PowerPoint MVP
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
 

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