Consulting

Results 1 to 8 of 8

Thread: Slide location

  1. #1
    VBAX Regular
    Joined
    Feb 2012
    Posts
    41
    Location

    Slide location

    This seems a simple question, but...

    I simply want to determine the slide position in a deck in "Normal View". It was easy to find how to do it in SlideShowView, but not so easy in Normal View. I've fiddled and searched for a day or two now and nothing seems to work. I'd appreciate any help anyone can offer. Thanks.

  2. #2
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,093
    Location
    It's not at all clear what you mean.

    You can get the index of the slide in view in edit view.

    [vba]Sub MakeShadow5()
    On Error Resume Next
    Err.Clear
    MsgBox "The current slide is Slide " & ActiveWindow.View.Slide.SlideIndex
    If Err <> 0 Then
    ActiveWindow.ViewType = ppViewNotesPage
    ActiveWindow.ViewType = ppViewNormal
    MsgBox "The current slide is Slide " & ActiveWindow.View.Slide.SlideIndex
    End If
    End Sub[/vba]
    the 'extra' code fixes the error when the selction is between slides in the thumbnail view.
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  3. #3
    VBAX Regular
    Joined
    Feb 2012
    Posts
    41
    Location

    Thanks.

    Thanks John. Sorry I wasn't clearer, but you hit the nail on the head. I got it working fine. Actually, part of my problem was that I was trying to execute a similar line of code in the immediate window rather than in a line of code in a module. I thought the code was in error, but it was simply how I was trying to use the editor to execute it. Lot's to learn all at once. I really appreciate your taking the time to respond to a newbie with a very simple question. I'll take a look at the link at the bottom of your post. John

  4. #4
    VBAX Regular
    Joined
    Feb 2012
    Posts
    41
    Location
    One more question for John or anyone else. There are lots of good books on programming VBA for Excel. I have not been able to find a good book on programming PowerPoint VBA. Does anyone have a recommendation?

  5. #5
    VBAX Contributor
    Joined
    May 2008
    Posts
    198
    Location
    Quote Originally Posted by jlingle
    One more question for John or anyone else. There are lots of good books on programming VBA for Excel. I have not been able to find a good book on programming PowerPoint VBA. Does anyone have a recommendation?
    The only book I ever found which is dedicated to VBA in PowerPoint is 'Powerful PowerPoint for Educators':
    http://www.amazon.com/Powerful-Power...9312860&sr=1-1

    There are a few VB/VBA books which might dedicate a few paragraphs or a chapter to PowerPoint, but not much.

  6. #6
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,093
    Location
    David's book is the only one dedicated to PowerPoint vba. It's not cheap and rarely a bargain second hand.

    Is it good for you, depends what you want. It's really aimed at Teachers who want to use a little vba in their presentations to make them interactive,

    If you are looking for a complete guide to the PowerPoint object model it isn't that.

    I have Office XP Development with vba by Peter Aitken. Obviously a little (not much) out of date now and only one chapter on PowerPoint but thourough. It is often to be found cheap second hand and it's worth having if you can get it for a few dollars (mine was $7)

    For me though I'd ask questions here and also study the code samples on our site, Shyam Pillai's site and PPTFAQ. and see if you can work out how they work.
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  7. #7
    VBAX Regular
    Joined
    Feb 2012
    Posts
    41
    Location
    Thanks guys. Very helpful. I've basically been reading my VBA for Excel book and then fiddling with the PPT code until I can get it to work. The application I've been working on adjusts charts and tables in a PP deck from data contained in a multi-tab Excel spreadsheet.

  8. #8
    [VBA]ShowSlideWindows(1).View.Next[/VBA]

Posting Permissions

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