I have a set of grouped images in the PowerPoint slide.
When in Slide Show Mode (full screen) and I hover over these grouped images the slide event needs to take place. Usually when the mouse's slider is slide it ends full screen mode or moves to next slide. Instead I want the mouse slide event to take place. How can I do this in VBA or is there setting in PowerPoint to prevent this?
I'm not sure I understand what you're after, but perhaps this will help:
You can assign any shape (including shapes that are groups of other shapes) an Action Setting (it's on the Insert tab). The Action Setting can be triggered by either a mouse click or ... and this is what you want, I think ... a mouse OVER.
The action can do a variety of things, including trigger a macro (ie, a VBA subroutine in the same presentation file). The macro can receive a reference to the shape that triggered it as well. For example, if you assign this as the macro to run, when you hover over the shape, you'll get a message box with the shape's name:
Sub WhoAmI(oSh as Shape)
MsgBox oSh.Name
End Sub
MouseOver is actually not triggered by the mouse cursor being over the shape so much as by moving from NOT over the shape to being over the shape. Most of the time this distinction isn't important, but if you do a mouseover over a full-slide shape, it won't work.
Related
I'm trying to create a VBA module such that, when a button is clicked, it will trigger a shape to fade in. I want to make it such that there is one of these buttons on every slide of the presentation, but every button will only trigger the shape on the same slide that the button is on. Is that possible, or do I need to create separate modules for every button?
I was thinking maybe you could use "Dim" and do something like
Sub FadeInShape()
Dim x as [the slide number of the slide on which the button was clicked]
but I don't know what that object would be called or if that object even exists.
Use a Trigger on a shape to start the animation. No VBA required:
I have a shape named box1 in my first slide. It has no animations attached to it. However, there are other shapes on the slide that contain lots of trigger animation sequences. If I run the macro ActivePresentation.Slides(1).Shapes("box1").Top = 400 the trigger animation state doesn't change. If I had changed the colour of some other shape via the trigger animation, it stays the same. It is perfect, only the position of box1 changes.
Now, if any animation is attached to box1 and the same macro is played, the animate state of the entire slide resets.
I tried using GetClickCount but that always remained 0 as the animations were all part of trigger sequences. I would appreciate any and all help on this front.
Thank you very much.
Making a powerpoint that's supposed to show a before and after of a website. Since it's currently a long website I'd rather make a single long slide to put it on (20" instead of 7.5"). But all the other slides in the presentation should be normal-sized.
I found Slide Size (Design ribbon, Customize section) but that resizes ALL slides.
You can't. You can only have one slide size and one orientation per presentation.
Are you projecting the presentation or delivering it on a laptop?
If so, the size is sort of irrelevant.
Regardless of the slide size, the projected/displayed image will never be longer or wider than the projector/display accepts.
Although you cannot use different sized slides in one PowerPoint file, for the actual presentation you can link several different files together to create a presentation that has different slide sizes.
The process to do so is as follows:
Create the two Powerpoints (with your desired slide dimensions)
They need to be properly filled in to have linkable objects and selectable slides
Select an object in the main PowerPoint to act as the hyperlink
Go to "Insert -> Links -> Action"
Select either the "Mouse Click" or the "Mouse Over" tab
Select "Hyperlink to:" and in the drop down menu choose "other PowerPoint Presentation"
Select the slide that you want to link to.
Any slide that isn't empty should appear in the "Hyperlink to Slide" dialog box
Repeat the Process in the second Presentation to link back to your main presentation
Reference to Office Support Page where this solution was first posted.
https://support.office.com/en-us/article/can-i-use-portrait-and-landscape-slide-orientation-in-the-same-presentation-d8c21781-1fb6-4406-bcd6-25cfac37b5d6?ocmsassetID=HA010099556&CorrelationId=1ac4e97f-bfe6-47b1-bab6-5783e78d126d&ui=en-US&rs=en-US&ad=US
True you can't have different sized slides. NOT true the size of you slide doesn't matter. It will size it to your resolution, but you can click on the magnifying icon(at least on PP 2013) and you can then scroll in all directions of your slide in original resolution.
if you want to shrink one slide for instance, add shapes to hide the unwanted background margins. you can set the shape color filling as the background (gray or black).
It's "ugly" but it works
true, this option is not available in any version of MS ppt.Now the solution is that You put your different sized slide in other file and put a hyperlink in first file.
We're developing a PowerPoint plugin, recently we got a requirement from our client to start certain functionality after animation on an object is completed but I'm not able to find any animation finished or started events.
As PeterT has mentioned, there are no events fired when shapes animate. But here's a possible workaround. It may or may not fit your needs:
Add a shape the size of the animated shape, give it a Run Macro Action Setting on mouse-over (not on click). Have it run whatever macro you've written to do what's needed.
Make the shape 99% transparent and animate it to appear automatically after the main shape you've animated.
Result: your original shape animates on, then the (for all intents) invisible add'l shape appears and as soon as the user wiggles the mouse, the macro fires.
If you can't be sure that the user will have the mouse over the shapes in question, try adding a full-slide shape instead to trigger the macro. In that case, to avoid having the macro trigger repeatedly, you might need to have the macro make the shape that triggers it invisible or have the macro remove the action setting or the like.
PowerPoint entrance animation set up with "Start: With Previous" starts right when a new slide is advanced. However, if you set up an exit animation in the same way, it doesn't start with a slide ending sequence. Instead, the "Start: On Click" trigger needs to be used and after your exit animation is over you still need one extra click just to advance to the next slide.
Workarounds to this are obvious: create a duplicate slide, make your ending animations from the original slide being your starting animations on the duplicate slide and let them be followed with whatever you want or create a transition slide with those ending animations only and set up "Change Advance slide -> Automatically after -> [the time it takes your animations to finish]".
These workarounds will make it work for your audience, visually. However, it has an impact on slide numbers you might need to adjust accordingly and/or duplicate content changes. If you are the only one creating and using your presentation, this might be just fine. But if you are creating a presentation in collaborative mode with three other people and don't even know who will be the presenter at the end, you can mess things up.
Let's be specific: most of my slides have 0.2s fly in entrance animation applied to blocks of content coming from right, bottom or left. Advancing to the next slide I want them to fly out in another 0.2s exit animation being followed by new slide 0.2s fly in entrance animation of the new blocks. The swapping of the blocks should be triggered while advancing to the next slide, as usually.
As mentioned, I'm not able to achieve this without one extra click between the slides.
I wrote a VBA script that should start together with an exit animation and will auto advance a slide after 0.3s when the exit animation is over. That way I should get rid of those extra clicks which are needed right now.
Sub nextslide()
iTime = 0.3
Start = Timer
While Timer < Start + iTime
DoEvents
Wend
With SlideShowWindows(1).View
.GotoSlide (ActivePresentation.SlideShowWindow.View.Slide.SlideIndex + 1)
End With
End Sub
It works well when binded on a box, button or another object. But I can't make it run on a single click (anywhere on the slide) so that it could start together with the exit animation onclick trigger. Creating a big transparent rectangular shape over the whole slide and binding the macro on it doesn't help either. By clicking it you only get the macro running, exit animation is not triggered.
Anyway, I don't want to bind the macro to any other workaround object but the slide itself.
Anyone knows how to trigger a PowerPoint VBA script on slide onclick event?
Anyone knows a secret setting that will make the exit animation work as expected i.e. animating right before exiting a slide while transitioning to the next one?
Anyone knows how to beat this dragon?
Thank you!
You could also set the TRANSITIONS (tab) -> Advance Slide After 00:00:00 seconds. You will need to set the SLIDESHOW (tab) to Use (Rehearsal) Timings. This will automatically advance the slide after the last animation action. You could, of course give it some seconds to wait, but it sounds like you just want to advance the slide.
You can intercept events in powerpoint using class module
In Class Module
In left combo (object) in VBA Explorer you can see ppt and in right your events
Private WithEvents ppt As PowerPoint.Application
In common module use
set x= new class1
Now you can use all events of presentation.
[]'s
OnSlideShowPageChange: VBA working while going to a slide without pressing any button
Sub OnSlideShowPageChange(ByVal SSW As SlideShowWindow)
If SSW.View.CurrentShowPosition = SSW.Presentation.Slides(x).SlideIndex Then
'PUT CODE HERE
End If
End Sub
Theire is a code havy workaround
You do that using the duplicate methode. However you duplicate using vba not manualy.
You can use the OnSlideShowPageChange
Test if the slide is one that need to be duplicated using a naming scheme of your choice. Then duplicate the slide. Then set the trasition effect to non and make it transition after 0 sec duration. Then remove all animations and add the exit animations desired.
Then you use the SlideShowEnd event to delete all the duplicate slides.
Note that you can use the SlideShowBegin to duplicate all the slides at once however duplicating a slide is not a fast tasck. So if you have a lot of havy slides to duplicate strating you presentation may take few seconds.
Sorry for not providing the code since it needs several lines.
For naming the slides you use also a macro.