Can not get the active cursor postion in powerpoint

C

Cynthia

I am developing an addin in PowerPoint 2003 using vs2008.
But now I get a problem. I want to add a new slide after the user selected
silde, but If the user just put the cursor between two slides without
selected one of them, then I could not know the new slide position in code.
I found if I put the cursor between two sildes, in the slide view pane, the
one before cursor is shown. How's this index got?


Thanks very much for your help.
 
S

Shyam Pillai

Steve Rindsberg said:
Bingo. Thanks, Shyam.

FWIW, it might be useful to set the .ViewType to ppViewNormal instead of
ppViewSlide if in PPT 2000 or higher. Otherwise, when the user dblclicks
on
a slide in Sorter view, they go back to Slide view, something they won't
be
accustomed to seeing.

That's correct.

Regards,
Shyam Pillai

Image Importer Wizard: http://skp.mvps.org/iiw.htm
 
S

Shyam Pillai

If ActiveWindow.ViewType = ppViewNormal Then
'Check that it is not the master views
If ActiveWindow.Panes(2).ViewType = ppViewSlide Then
ActiveWindow.Panes(2).Activate
Debug.Print ActiveWindow.Selection.SlideRange(1).SlideIndex
ActiveWindow.Panes(1).Activate
End If
End If

Regards,
Shyam Pillai

Animation Carbon: http://www.animationcarbon.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