0

I have a presentation with 6 slides. Slide 5 contains vba / macro codes for rotatechart, change angle etc., The codes work well thru' vba editor 'RUN'in active document.(.ppt) but when put in 'Slideshow" mode codes don't work. Dbug msg: "Invalid request. no active document present". Pl help with code.

Sub MoveItInSlideShow()
  With SlideShowWindows(1).Presentation.Slides(5).Shapes("Picture 2")
      ActiveWindow.Selection.SlideRange.Shapes("Picture 2").Select
      Application.Run "'Hora.ppt'!Slide7.CreateSpirograph"

  end with
end sub

Thanks

1
  • Which version of PowerPoint are you using? That will help me to understand what your options are.
    – user1064180
    Commented May 31, 2013 at 21:27

1 Answer 1

0

This line is unnecessary, since you've already set a reference to the shape in the With statement previous:

ActiveWindow.Selection.SlideRange.Shapes("Picture 2").Select

But since you can't select anything in slideshow view, any attempt to .Select anything will cause an error, which is probably what you're seeing.

If the code here requires a selected shape, you'll need to rewrite it:

Hora.ppt'!Slide7.CreateSpirograph
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.