Eleonor
Eleonor

Reputation:

VBA PowerPoint Online Guide and How to Record a Macro

Could anyone recommend to me a good online guide to PowerPoint VBA? Also, does anyone has advice on how to record a macro in PowerPoint?

Upvotes: 4

Views: 37389

Answers (2)

Bruno Leite
Bruno Leite

Reputation: 1477

Microsoft remove macro recorder from PowerPoint 2007.

To view the struct of objects use Watch (Shift +F9) in object.

For Example

dim ppt as powerpoint.Presentation

set ppt =activepresentation

add watch to ppt to view the struct of object Presentation

otherwise

Add a new class module

in the class declare

Private WithEvents ppt As PowerPoint.Application

in comon module declare one instance from classCreate(default is Class1) using

set x= new class1

Now in module class you can get events for you presentation (in left combo up the code window)

Bruno Leite

Office Developer

Upvotes: 4

Knobloch
Knobloch

Reputation: 463

To record a powerpoint macro:

  1. In the menu bar, click on Tools
  2. Mouse over Macro > and the submenu will be displayed
  3. Click the Record button - a new toolbar will be displayed
  4. Do your thing
  5. Click the stop button on the new macro toolbar

Click on Tools->Macro->Macros. Find the macro you just recorded and click the Edit button. That will show you what was recorded. Make your modifications and click the triangular run button (or push F5) to run your code.

As far as an online guide, I usually think of a question and use Google or ask a question here on StackOverflow.com. I've been able to answer most of my questions that way, I haven't found a particular main resource for all things Powerpoint VBA.

Also, you can find answers that can help you by looking into VBA articles for other MS Office products - a lot of things that are not Powerpoint-specific (general VBA) will be the same as for the other products.

Upvotes: 2

Related Questions