Reputation:
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
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
Upvotes: 4
Reputation: 463
To record a powerpoint macro:
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