Log in

View Full Version : [SOLVED:] Scroll into view



RandomGerman
12-05-2016, 12:47 PM
Hi all,

trying to zoom in to a specific area, the method ScrollIntoView looked quite interesting to me.

On a Microsoft site I found this piece of code as an example:


Sub Zoom()
ActiveWindow.ScrollIntoView Left:=50, Top:=20, Width:=100, Height:=200
End Sub


But ... nothing happens at all.

It might have to do with my PowerPoint version, which is 2010. On the MS site they wrote 2013 and newer. Well ... but how do I have to use ScrollIntoView in 2010 then? Sorry for posting a question on such a (probably) simple thing, but Google didn't help this time, I had no results differing from this.

John Wilson
12-05-2016, 09:59 PM
ScrollIntoView only work (in edit mode) when the specified area is NOT already visible.

Try this:

Put a shape in the top left hand corner


Sub Zoom()
ActiveWindow.ScrollIntoView Left:=50, Top:=20, Width:=100, Height:=200
End Sub


Do not select the shape but zoom to 400% so it is off screen and run the code.

RandomGerman
12-06-2016, 10:56 AM
Got it. So what I have to do for zooming to a specific area is first define the zooming (ActiveWindow.View.Zoom = Whatever I want) and then use ScrollIntoView to define the desired area of the slide.

Thank you, John. Great help, as always!