first Selected slide count

D

Dileep

Hello,
I have 5 slides. Out of five i selected three slide only.I want to
detect
the first selected slide count.
Thanks
Dileep
 
T

t-4-2

" ...... I want to detect the first selected slide count. " .... ???
Right click on the 2 slides that you do not want, click Cut or Delete Slide,
the slide count will self-adjust.
Not sure if that's what you want.
t-4-2
 
J

John Wilson

There seems to me some MSoftie Weirdness though.

Try this

Start with say a three slide pres
ctrl click slide 1
Next ctrl click Slide 3

Run this

Sub What()
Dim osld As Slide
Set osld = ActiveWindow.Selection.SlideRange(1)
osld.Shapes.AddLabel(msoTextOrientationHorizontal, 10, 10, 100, 10) _
..TextFrame.TextRange = "Right Slide??"
End Sub

Any idea why? I've just had to solve this in a custom add in by detecting
the ctrl key state and making adjustments but this can't be the best answer
--
john ATSIGN PPTAlchemy.co.uk

Free PPT Hints, Tips and Tutorials
http://www.pptalchemy.co.uk/powerpoint_hints_and_tips_tutorials.html
PPTLive Atlanta Oct 11-14 2009
 
B

Bill Dilworth

It seems to store the reverse order of SELECTION, not the order of slides
within the slide show (no clue why). You will need to add a sort to the
selection range to find the lowest slide index.

Just to show this to yourself...

With ActiveWindow.Selection
For x = 1 To .SlideRange.Count
Debug.Print .SlideRange(x).SlideIndex
Next x
end with

Bill Dilworth
 
B

Bill Dilworth

What, you expected it to be easy?

Is the OP looking for the first slide selected within the range, or the
lowest slide index of the selection range?

If it is the lowest slide index number, it might be worthwhile to toss the
index numbers of the range into an array and bubble sort the thing.

If it is the first slide selected, they might get better luck by trapping
slide selection change and test it against the sliderange.count. Then it is
just a matter of storing the index number whenever there is a single slide
selected (whether selecting a range with shift or control, you always have
to start with just one slide selected).

Bill
 

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