Excel 如何在VBA中指定自定义PowerPoint模板
我正在Excel中编写一个宏,用于创建新的PowerPoint,并将工作簿中的文本插入幻灯片的特定区域。我已经为5张幻灯片创建了自定义布局,但不知道在哪里保存PowerPoint模板文件,以及在使用VBA后如何引用它?您可以通过以下三种方式之一找到当前模板文件夹:Excel 如何在VBA中指定自定义PowerPoint模板,excel,powerpoint,vba,Excel,Powerpoint,Vba,我正在Excel中编写一个宏,用于创建新的PowerPoint,并将工作簿中的文本插入幻灯片的特定区域。我已经为5张幻灯片创建了自定义布局,但不知道在哪里保存PowerPoint模板文件,以及在使用VBA后如何引用它?您可以通过以下三种方式之一找到当前模板文件夹: 通过用户界面单击文件/另存为并选择.potx文件类型。这将生成格式为C:\Users[USERNAME]\AppData\Roaming\Microsoft\Templates的文件夹,您可以使用以下命令在VBA中生成此文件夹: sP
ActivePresentation.ApplyTemplate [filename]
顺便说一下,这是PowerPoint 2013的注册表值:HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\PowerPoint\Options\PersonalTemplates感谢回复,JamieG。我正在运行PowerPoint 2010。让新创建的PowerPoint使用我保存在适当文件夹中的模板仍有问题:C:\Users[USERNAME]\AppData\Roaming\Microsoft\Templates。出现了什么问题?您可以共享任何特定的代码吗?