Acknowledgements for InsertPicture
Microsoft ª PowerPoint 2004ª Add-in

 

April 24, 2005

This add-in was created because I wanted to import pictures from my digital camera into PowerPoint so that they would fit the presentation screen window. Fortunately, Microsoft includes Visual Basic for Applications with Microsoft PowerPoint for the Mac, so I was able to write an application to accomplish this. MicrosoftÕs visual basic has the ability to execute AppleScripts, a capability that is used in the current version of the add-in.

 

Searching the internet for visual basic code samples is always a good idea. I used this one from RDP Slides, which is by Microsoft MVP Steve Rindsberg.

 

SteveÕs sample was a starting point, but it didnÕt work exactly the way I wanted it to, so I made modified the code substantially. My revised code works they way I want with pictures of any aspect ratio.

 

Some friends were visiting one night and saw my little add-in working and suggested that I put it up for sale. So, I did.

 

People liked it because it let you do some quick edits on the pictures such as brighten and contrast. Then I thought it would be a neat thing to add the ability to animate each picture as it was imported. Along the way I needed to determine whether or not a picture is already animated. ThatÕs where another Microsoft MVPÕs code came in handy:

 

Function IsShapeAnimated(oShp As Shape) As Boolean

 ---------------------------------------------------------------------

Copyright ©1999-2004, Shyam Pillai, All Rights Reserved.

---------------------------------------------------------------------

You are free to use this code within your own applications, add-ins, documents etc but you are expressly forbidden from selling or otherwise distributing this source code without prior consent. This includes both posting free demo projects made from this code as well as reproducing the code in text or html format. You may include acknowledgement to the author and a link to this site.

http://www.mvps.org/skp/pptxp004.htm

 

People liked my little add-in and wrote to me. They asked if I would make a new version that would import a lot of pictures at once instead of just one at a time. After a lot of experimentation, the bulk import feature was finally working.

 

Then PowerPoint 2004 came along. It has lots of new animations, motion paths, but unfortunately a Visual Basic command that I relied upon called FileFind was gone. This command was important for the bulk import feature to work. I came up with a work-around for the missing FileFind command. The result was that you had to type the file path into a text field. Not pretty.

 

Microsoft MVP Paul Berkowitz is an avid AppleScripter. YouÕll find his and other useful scripts at MacScripter.Net. Paul noticed that I had been feeling blue about the lack of FileFind and suggested that I try using an AppleScript within Visual basic. VB Help has this example:

ThePath$ = Macscript("Choose File")

 

Paul suggested that I use ÒChoose FolderÓ instead of ÒChoose File.Ó  Although this approach is not as comprehensive as Visual BasicÕs FindFile, it does the trick for my add-in. It is no longer necessary to type file path names into my add-in.

 

Another problem that needed to be solved with PowerPoint 2004 was how to implement all of the new animations. I enabled all of the new ones plus as many of the old ones that were still supported by Visual Basic. My add-in has more than 160 animations. MicrosoftÕs Macintosh Business Unit through the MVP program was helpful in helping me to accomplish this. I think youÕll find my add-in offers more animations than youÕll find using the PowerPoint custom animation dialog box in Mac or Windows.

 

Steve Rindsberg also suggested that I take a new approach to looping through the directory. Thanks to his suggestion the bulk import works faster than it used to.

 

ÒThank youÓ to the above people and organizations.

 

-Jim Gordon

 

InsertPicture Add-In Web Page