Supercharge your PowerPoint productivity with

Supercharge your PPT Productivity with PPTools - Click here to learn more.

Tell me about PPTools

VBA in PowerPoint / Mac vs. Windows


PPTools
Shape Styles brings the power of styles to PowerPoint. Apply complex formatting with a single click
Merge Excel, CSV or tab-delimited data into PowerPoint presentations to create certificates, awards presentations, personalized presentations and more
FixLinks prevents broken links when you distribute PowerPoint presentations
Optimizer saves disk space and bandwidth, shrinks your PowerPoint presentations to the right size for email, screenshow or printing
PPT2HTML gives you full control of PowerPoint HTML output, helps meet Section 508 accessibility requirements
Prep4PDF preserves interactivity in PowerPoint presentations when you convert to PDF
Image Export converts PowerPoint slides to JPG, PNG, GIF, WMF and more

Thanks to MVP and general Mac Wizard Jim Gordon for this info:

The vast majority of VBA for PPT is the same for Macintosh as it is for Microsoft OS based PPT. Here are some of the differences that I am aware of:

  • Macintosh - Lacks the ability to record VBA scripts
  • Macintosh VBA Editor - Some intellisense features not included, some debug features missing, can't customize editor toolbars, but the windowing is a lot better especially when stepping through code.
  • Macintosh sendmail is different.
  • Macintosh file path separator is colon : rather than backslash \
  • Macintosh PPT supports QuickTime movie objects (including MPEG, virtual reality & Streaming)
  • There's a built-in scripting language on the Mac called AppleScript (MS calls it "Macscript" in documentation) which allows for interoperability with other applications and the OS. VBA and AppleScript can call each other's routines and pass arguments back and forth.
  • You probably would not want to use SendKeys on the Mac
  • Macintosh Data Access is accomplished via ODBC and DDE but is different from MS DAO

Ed note: Through PowerPoint 2004, Mac PowerPoint VBA is roughly equivalent to Windows PowerPoint 97 VBA rather than the later version included in Windows PowerPoint 2000 and up. This means that several features like Private Enumerations and events are not supported on Mac so far.

I've also stumbled across a few oddities and gotchas:

  • If a toolbar is protected, a VBA routine in Windows PowerPoint can still delete/add/modify controls (buttons etc.) on the toolbar. Not so on Mac. The workaround's simple enough: have your code unprotect the toolbar, make the needed changes, then protect it again after you're done.
  • The .Name property of an addin returns the name of the file the addin's stored in (ie, MyAddin.PPA) rather than the addin's .Name property as it does under Windows.

Here's a handy trick if you need to write code that works on both PC and Mac: compiler switches.

#If Mac Then
' Code here will be run only on Macs but ignored on PCs
#Else
' Code here will be run on PCs but ignored on Macs
#End If


Page copy protected against web site content infringement by Copyscape Contents © 1995 - 2008 Stephen Rindsberg, Rindsberg Photography, Inc. and members of the MS PowerPoint MVP team. You may link to this page but any form of unauthorized reproduction of this page's contents is expressly forbidden.

Español    Deutsch    Français    Português    Italiano    Nederlands    Greek    Japanese    Korean    Chinese



Supercharge your PPT Productivity with PPTools


content authoring & site maintenance by
Friday, the automatic faq maker (logo)
Friday - The Automatic FAQ Maker

VBA in PowerPoint / Mac vs. Windows
http://www.pptfaq.com/FAQ00149.htm
Last update 09 September, 2006