Results 1 to 9 of 9
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Vancouver, Br. Columbia, Canada
    Posts
    632
    Thanks
    0
    Thanked 0 Times in 0 Posts

    find current slide index in slidesorter (PPT97)

    The following code snippet returns the current slide index when the Slide view is active:

    iCurrentIndex = ActiveWindow.View.Slide.SlideIndex


    What's the equivalent for when the SlideSorter view is active? I want to create a new slide using VBA, and have it appear after the current slide. Using my current code, the iCurrentIndex always reverts to 0 (error trapping), which creates the slide out of order.

    Thx.
    --------------------------------------------------
    Jack MacDonald
    Vancouver, Canada

  2. #2
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: find current slide index in slidesorter (PPT97)

    Jack, you cannot find the slide number in SlideSorter view. In fact, you really can't do anything in SlideSorter view. What you want to do before just about any PP macro is save the current slide view, reset it to Slide view, do the macro, and then reset the slide view to what you started with. Keeps everyone happy! Try out the macro below.
    <pre>Sub whichSlide()
    Dim saveView As Long
    With ActiveWindow
    saveView = .ViewType
    .ViewType = ppViewSlide
    MsgBox .View.Slide.SlideIndex
    .ViewType = saveView
    End With
    End Sub</pre>

    HTH --Sam
    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

  3. #3
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Vancouver, Br. Columbia, Canada
    Posts
    632
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: find current slide index in slidesorter (PPT97)

    Drat!!! I had feared that was the answer. My macro already does what you suggest.
    Thanks for the clarification.
    --------------------------------------------------
    Jack MacDonald
    Vancouver, Canada

  4. #4
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: find current slide index in slidesorter (PPT97)

    Now if I could just figure out your <A target="_blank" HREF=http://www.wopr.com/cgi-bin/w3t/showflat.pl?Cat=&Board=vb&Number=91592&page=0&view =collapsed&sb=5&o=0&fpart=>Image Control</A>. It's bizzare!
    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

  5. #5
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Vancouver, Br. Columbia, Canada
    Posts
    632
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: find current slide index in slidesorter (PPT97)

    Hey -- thanks for looking at that one. I am still awaiting an answer!! And you are right, it is bizarre.

    Got another one if you are up to it...

    What property holds the width (or height) of the current slide. I've tried ActiveWindow.width, but that seems to be something other than the actual slide size.

    What I am trying to do is to allow the user to drop any size file onto the slide, and have it resize itself automatically to fully occupy the slide space, whether the slide is portrait or landscape. I keep getting overhang.
    --------------------------------------------------
    Jack MacDonald
    Vancouver, Canada

  6. #6
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Vancouver, Br. Columbia, Canada
    Posts
    632
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: find current slide index in slidesorter (PPT97)

    By the way, how do you create the hotlink back to the other thread?
    --------------------------------------------------
    Jack MacDonald
    Vancouver, Canada

  7. #7
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: find current slide index in slidesorter (PPT97)

    <img src=/w3timages/blackline.gif width=33% height=2>
    > What property holds the width (or height) of the current slide
    <img src=/w3timages/blackline.gif width=33% height=2>
    That will take some digging; ie; I'll think about it Tuesday at work. Trying to figure out PowerPoint is the pits!

    <img src=/w3timages/blackline.gif width=33% height=2>
    > how do you create the hotlink
    <img src=/w3timages/blackline.gif width=33% height=2>
    While posting, click the and press one of the link buttons (first row, last two buttons). That puts some pseudo-html into your message and you fillin the URL and/or the description. You can also press help at the top of the window to get <A target="_blank" HREF=http://www.wopr.com/cgi-bin/w3t/w3thelp/markup.pl>better help for the markup tags.

    BTW, the Image problem is solved. --Sam
    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

  8. #8
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Vancouver, Br. Columbia, Canada
    Posts
    632
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: find current slide index in slidesorter (PPT97)

    Thanks.
    Looking forward to hearing if/when you solve the size problem.

    the image fix works like a charm.
    --------------------------------------------------
    Jack MacDonald
    Vancouver, Canada

  9. #9
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Vancouver, Br. Columbia, Canada
    Posts
    632
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: find current slide index in slidesorter (PPT97)

    Found the slide-size property:

    ActivePresentation.PageSetup.SlideHeight

    thanks for your help
    --------------------------------------------------
    Jack MacDonald
    Vancouver, Canada

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •