Consulting

Results 1 to 4 of 4

Thread: Referring to objects in running Powerpoint presentation

  1. #1
    VBAX Newbie
    Joined
    Feb 2021
    Posts
    3
    Location

    Referring to objects in running Powerpoint presentation

    I am trying to verify the slide and shape clicked to then make varying things happen. I can make it work when the presentation is not running but not when it is. I guess it's because I am not referring to the correct container/object at that time, but can't figure out what it should be, so any help would be much appreciated.

    here is a working snippet when the presentation is not running:

    If (ActiveWindow.Selection.ShapeRange.Name) = "Playing card 1" Then
    If (ActiveWindow.Selection.SlideRange.SlideID) = 283 Then
    Set Target = ActivePresentation.Slides.FindBySlideID(279)
    MsgBox ("This is the shape with a Card for Linus and target slide " & Target.SlideIndex)
    End If
    End If

    Msgbox doesn't appear in presentation, if a add an errorhandler it always errors. I've tried ActivePresentation.Slides instead of ActiveWindow and various others without success.

  2. #2
    VBAX Master
    Joined
    Feb 2007
    Posts
    1,963
    Location
    When you post the same question in multiple forums you should always say so. Otherwise people may be working on an answer that already exists elsewhere.

    Cross Post: Referring to objects in running PowerPoint presentation (msofficeforums.com)
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  3. #3
    VBAX Newbie
    Joined
    Feb 2021
    Posts
    3
    Location
    Thank you, sorry, etiquette learned.
    I have found out out that the slide information can be gleaned like this....
    ActivePresentation.SlideShowWindow.View.Slide.SlideID or .SlideIndex or .SlideNumber.
    But not how to do similar during Presentation for a Shape.

  4. #4
    VBAX Newbie
    Joined
    Feb 2021
    Posts
    3
    Location
    ....And I see you have answered in the other forum Thank you. For anyone else looking this is ....Referring to objects in running PowerPoint presentation (msofficeforums.com)

Posting Permissions

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