There's really only two differences here. Var PowerPoint As New PowerPointApplication Obviously if you typed this code in either Word or Excel, it would generate errors. In PowerPoint, the above code would run just fine since it knows what a Presentation object is. For example this is VBA code running in PowerPoint: There is an implied Application instance when you write VBA code from within Excel, PowerPoint, or Word. One of several third-party books on VBA is "VB & VBA in a Nutshell: The Language" by Paul Lomax (ISBN: 1-56592-358-8). Microsoft has additional information on VBA at and have published their own language references on VBA.
Windows Office 2003 prompts you to install the VBA help files when you first request VBA help. If VBA Help does not appear, you will need to install the help files. The help is contextual in the sense that it provides information on automating the Office application from which you launched the Visual Basic editor. When the Visual Basic editor appears, choose Microsoft Visual Basic Help from the Help menu. To access the online help in Office 2003, choose Macros from the Tools Menu of your MS Office application, and then choose Visual Basic Editor from the Macros submenu. You will then see a Visual Basic button in the Code group in the ribbon and menubar now includes a Help menu which leads to the VB online help. Then select Popular and select the Show Developer Tab in the Ribbon checkbox. In Office 2007, click the Microsoft Office button and then click Options. Microsoft Office applications provide online help for VBA. The language that you use to automate Microsoft Office applications is documented by Microsoft and numerous third-party books on Visual Basic for Applications (VBA). Office Automation is supported only under Windows. The class that contains the enums you need for UserGuide:Office Automation Overview. specifiers to make sure you will not attempt to use this class on an incompatible platform. This class is only available on the Windows platform.įor cross-platform compatibility, use #If.#Endif with the Target.