简体   繁体   中英

Recording VBA code in Power Point 2007?

In Office 2003 if I recall correctly you had a "record macro" option.

In PowerPoint 2007, under View->Macros, you get a macro box. None of the options are "record". If you put in a name, you can select "create", but that takes you to the VB editor. If you edit the slide manually, it does not generate the VBA code.

You do not have the option of defining VBA code by a sequence of keystrokes/mouseclicks/whatever.

It seems you are out of luck What happened to the macro recorder?

I have since read:

Contrary to what Microsoft says, use the legacy keyboard commands Alt+T, M, R to start the macro recorder in Powerpoint 2007, and use the same keyboard combination to stop recording.

The macro recorder works using this shortcut, but you should note that it won't record for features that were added after Powerpoint 2003 (and this includes anything to do with the new charting engine that was introduced in PPT 2007).

This isn't about arrogance, it's simply that 2007 was a BIG rewrite for all of the Office applications. To ensure that the product went out on time, some features had to be de-scoped and the macro recorder was one of them, since Powerpoint automation is used by a relatively small user group when compared with Excel or Word automation.

Powerpoint add-ins are common, but they're built by developers and although it's handy we can live without the macro recorder. Visual Studio isn't necessary for building Office Add-Ins, although it does have advantages. What you really need is someone competent in building Office solutions.

Both answers are correct the macro recorder can be activated but it is pretty much useless since it records little to nothing. It seems that the ppt programmers at MS really take issue with customers being able to customize powerpoint. Executing repetitive tasks or just formatting an object the way you want it (and not being stuck with the pre-cooked options that MS in its infinite wisdom or shall I say bloody arrogance believes is all you need) has become almost impossible. The only way out is to program the ribbon or create an add-in which has to be done in Visual Studio (VBA will not cut it).

Keystroke 激活记录不起作用,它会创建一个空宏,其中包含很少(通常没有!)您执行的实际操作。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM