OfficeTips Home || VBA Section || General Section || Download Section || Privacy Policy |
How to do an image toggle in PowerPoint |
|
The code given below is designed to toggle the image in
the shape with another predefined one. This can be extended to any
number of images if required. It is a generic routine and will work with
any shape on any slide provided it is a linked image.
'-------------------------------------------------------------------------------- Sub SwapPicture(oShp As Shape)
|
|
This code snippet illustrates the manner in which PowerPoint can be automated from any external application. In this example a slide in inserted into a new presentation and then an image is imported into the slide and scaled to it's original size. You can run this code from any Office application or
Visual Basic® but don't forget to add a reference in the project to the
PowerPoint object library and the Office object library. '
-------------------------------------------------------------------------------- Sub InsertGraphicOnSlide()
|
Copyright 1999-2018 (c) Shyam Pillai. All rights reserved.