I'm a bit short on time so this will be quick. First, you want to check
if there really is a next or previous slide, so you might want an If
statement to make sure that this isn't the first or last slide. You don't
need .SlideShowWindow.Presentation; ActivePresentation.Slides should be
sufficient.
Now you need to figure out two things. What is going to activate this,
and where is the text going to reside. It seems like you are trying to
put this in a shape on the Master slide that will be changed each time
you move from slide to slide. That is fine if you have the code to do
that and shapes on the master slide to hold the text.
You might also want to have an error check to make sure the next and
previous slides have titles (not all slides necessarily have titles).
To activiate your code, you will want the buttons (maybe you should make
them buttons and not labels) execute:
ActivePresentation.SlideShowWindow.View.Next
and then have it run the code to change the text (so you will be on the
correct slide). That is, one macro to move and change text. Otherwise, I
don't know how you are going to activate the change text code.
--David
--
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/
(E-Mail Removed) wrote in
news:(E-Mail Removed):
> Hi All-
> Good group here. I've found alot of useful stuff on it but I was
> having trouble figuring this out:
>
> Basically, beside my 'Next Slide' & 'Previous Slide' links, I want to
> actually display the actual title of these slides. I am having
> trouble figuring out the right strategy to go about this. After many
> iterations, this is what I have, which I now can't even seem to
> trigger but did work earlier (work meaning, it displayed the title in
> the label after clicking the label). Here is what that code looks
> like:
>
> PrevSlideTitle =
> ActivePresentation.SlideShowWindow.Presentation.Slides(SlideShowWindows
> (1).View.Slide.SlideIndex - 1).Shapes.Title.TextFrame.TextRange.Text
>
> NextSlideTitle =
> ActivePresentation.SlideShowWindow.Presentation.Slides(SlideShowWindows
> (1).View.Slide.SlideIndex + 1).Shapes.Title.TextFrame.TextRange.Text
>
> Label1 = PrevSlideTitle
> Label2 = NextSlideTitle
>
> I can figure out how to assign a label (or any other control for that
> matter) these default values.
>
> The problems I am having are:
> - I can't get this to work properly when I put these label controls on
> the slide master. They only seem to work when on individual slides
> - They don't do anything until I click on the label
> - They don't update when I move to the next or previous slide
>
> Is there an easy way to do this? I am very new at PPT macros but have
> VBA experience in Excel & Access.
>
>