VBA- finding parent slide of a selection

E

Edward

Hi everybody,
I want to find a parent slide layout type of a bodytect placeholder that
user has selected
debug.print ActivePresentation.Slides _
(Activewindow.selection.Parent.SlideIndex).CustomLayout.Index

but Activewindow.selection.Parent.SlideIndex doesn't return a correct
slideindex . Any suggestions how can I do this?
 
D

David Marcovitz

Hi everybody,
I want to find a parent slide layout type of a bodytect placeholder that
user has selected
debug.print ActivePresentation.Slides _
(Activewindow.selection.Parent.SlideIndex).CustomLayout.Index

but Activewindow.selection.Parent.SlideIndex doesn't return a correct
slideindex . Any suggestions how can I do this?

I think you want:

ActiveWindow.Selection.SlideRange.SlideIndex

That should give you the SlideIndex of the current slide (in Normal View)
regardless of whether a shape is selected or not.

--David
--
David M. Marcovitz
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
Microsoft PowerPoint MVP
Associate Professor, Loyola University Maryland
 

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