vba 如何在powerpoint 2013中录制宏

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/21695793/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-08 17:45:26  来源:igfitidea点击:

How to record macro in powerpoint 2013

vbapowerpoint

提问by Irakli Andguladze

I am trying to record macro in 2013 but after i turn off powerpoint and start it again macro disappears.

我试图在 2013 年录制宏,但在我关闭 Powerpoint 并再次启动它后,宏消失了。

I am trying to make some kind of powerpoint template and add it to every new presentation automatically.

我正在尝试制作某种 powerpoint 模板并自动将其添加到每个新演示文稿中。

采纳答案by Siddharth Sawjiani

1) Open the file where the macro is saved.

1) 打开保存宏的文件。

2) Go to File -> Options -> Customize Toolbar

2) 转到文件 -> 选项 -> 自定义工具栏

enter image description here

在此处输入图片说明

3) Under Choose commands from, select Macros

3)在选择命令下,选择宏

4) Add the Macro under a new group

4)在新组下添加宏

enter image description here

在此处输入图片说明

It should appear on the Home ribbon every time you open PowerPoint

每次打开 PowerPoint 时,它都应该出现在主页功能区上

enter image description here

在此处输入图片说明

回答by Alaa Sadik

Not available any more since 2010 version. Write your own vba script instead.

自 2010 版本以来不再可用。而是编写您自己的 vba 脚本。

回答by Vincent Courtemanche

Are you saving in a macro-enabled format? If not, macros/modules will disappear when you close the presentation.

您是否以启用宏的格式保存?如果没有,当您关闭演示文稿时,宏/模块将消失。

To save in a macro-enabled format ...

要以启用宏的格式保存...

  1. Click on the "Files" tab
  2. Select "Save As"
  3. Choose a location
  4. In the dialog box that opens, click on the "Save as type" drop-down menu
  5. Select "PowerPoint Macro-Enabled Presentation (.pptm)" or "PowerPoint Macro-Enabled Template (.potm)"
  1. 单击“文件”选项卡
  2. 选择“另存为”
  3. 选择一个位置
  4. 在打开的对话框中,点击“保存类型”下拉菜单
  5. 选择“PowerPoint 启用宏的演示文稿 ( .pptm)”或“PowerPoint 启用宏的模板 (.potm)”

There's no way (that I know of) to automatically add the macros/modules directly INTO new presentations, what you need to do is create a new PowerPoint template and save the macros in it (using the *.potm file format above).

没有办法(据我所知)自动将宏/模块直接添加到新演示文稿中,您需要做的是创建一个新的 PowerPoint 模板并将宏保存在其中(使用上面的 *.potm 文件格式)。

I don't think there's a "personal presentation" in PowerPoint like there is in excel, so you'll have to make sure the template is open/loaded for the macros to be available to other presentations. You can set a template as the default one for PowerPoint (https://support.office.com/en-us/article/Load-and-apply-a-personal-template-71262c90-1447-4109-90f3-eb84f9d06c98), but this won't work if you work with multiple different templates. The other option is to have the user manually open the template every time they open PowerPoint.

我认为 PowerPoint 中没有像 excel 中那样的“个人演示文稿”,因此您必须确保模板已打开/加载,以便宏可用于其他演示文稿。您可以将模板设置为 PowerPoint 的默认模板 ( https://support.office.com/en-us/article/Load-and-apply-a-personal-template-71262c90-1447-4109-90f3-eb84f9d06c98) ,但如果您使用多个不同的模板,这将不起作用。另一种选择是让用户每次打开 PowerPoint 时手动打开模板。

Cheers

干杯