Home Up Updates Add-ins Fun Stuff

Bill's Large scale image scrolling ...






Microsoft  PowerPoint MVP 2003-2007


This website is a work in progress ... 





    Large pictures cut off while scrolling or moving using animated motion paths.  These large pictures are often panoramic backgrounds or very large masking blocks and may extend several screen widths.


PPT Versions:

    PowerPoint 2002 (XP), 2003



    PowerPoint renders an area about 1 screen size beyond the edge of the slide in all directions, when running a show.  When you use a motion path on an object within this area, PowerPoint will render the image and move it as requested.  This is normally good enough for anything you will need to do.    However, when objects exceed this area they are clipped and will not be completely rendered.  Therefore an object will move normally until this non-rendered part comes into view at which point the image is truncated.



   When an object is moved using VBA the entire area is again rendered.  This means that you can move a large object with VBA and not have the image clipped at the range of the rendering area.  Yes, Bill, that's all fine and all, but how?


I'm so very glad that I asked.  First you will need some code.  Enter this Macro code in the VBE window:


Sub MoveMe(oShp As Shape)

'Determine the endpoint for the motion. In this _
      case when the left edge of the picture lines _
      up with the left edge of the screen.
     While oShp.Left < 0

'Move the picture a little to the right

          oShp.Left = oShp.Left + 1

'Re-render the screen

'Loop back if not done

End Sub





Next, you will need a way to start this code running.  Right click on the picture and select Action settings.  In the 'On click' tab, select Macro.. and then 'MoveMe'.


Now, during a slide show, clicking on the picture will move it to the right until the left edge lines up with the left edge of the screen.







Problems and pitfalls:

1) This solution changes the presentation itself, so the picture's placement on the slide will be modified.  Therefore the presentation will give you the option of saving the updated presentation when you close it.  If you save it, the picture will begin next time, where it finished this time (and therefore, not need to move at all).  If you do not save it, than all changes will be lost, not just the ones to this picture.


2) The only speed control is by adjusting the amount the .Left value is altered by.  If you change that number from 1 to 5, the picture will move 5 times faster, but will still take the same number of "steps" so the motion may become jerky.


3) VBA does not run from the viewer, or on systems with macro security set to high.



If you will be running the presentation, on a machine you can set-up, and remember to restore the picture to the original position, this is an excellent option.



Home ] Up ]

Send mail to BillDilworth@mvps.org with questions or comments about this web site.
Copyright 2004-2007 Bill Dilworth
Last modified: 06/12/07