Thursday, August 20, 2009

Power Point Picture Synchronization

Some time ago I worked on a project where I was automatically generating/regenerating png graphics of some business diagrams and thought of how someone would be able to use these in a PowerPoint presentation.

Typically users go to Insert->Picture->From File, and select a picture to insert into a presentation. You have two options in PowerPoint for how to store this image: either embed a bitmap in the PPT file or have PowerPoint link to the file, meaning PowerPoint loads the image fresh every time you start PowerPoint.

So if you have constantly changing graphics, it's a great idea to use the linking functionality. Now no matter what you'll always have the latest and greatest version of that graphic in your presentation.

But what if you want to send someone else that file? If you email someone the PPT file with a linked image, PowerPoint will be looking for that image file, so you have to send that picture along and have the recipient store their file in the same location. You could argue that you can put it on a shared drive, but what if your recipient is off the network?

I tackled this problem by building an addin for PowerPoint in VBA. The addin creates a toolbar with buttons that allow you to import a linked image to a presentation. The addin stores the path to the image file, but also stores a local copy of the image. Every time you open the presentation (with the addin enabled), the addin simply checks the modification date of the file versus the date when the image was updated in PowerPoint. If the linked image has been modified, the addin simply swaps out the old image with the new one, maintaining animation options and size.

This software is provided as is for use however you want, with no warranty or guarantee of how it will work.

I've tested the addin with PowerPoint 2003 and 2007. You can download it here. To install it simply copy the PictureSync.ppa file to %appdata%\microsoft\addins

Then open PowerPoint and enable the addin. The toolbar will appear in PowerPoint 2003, and will appear in the Addins ribbon tab in PowerPoint 2007.

If you have any questions of comments let me know here.