vba - PowerPoint VBA 宏给出运行时错误 448 : Named argument not found

标签 vba powerpoint

我正在尝试创建一个 PowerPoint 2010 VBA 宏来向每张幻灯片添加一个文本框。 但是,使用 MSOffice documentation to create a text box 中的命令甚至不起作用。

Set myDocument = ActivePresentation.Slides(1)
myDocument.Shapes.AddTextbox(Type:=msoTextOrientationHorizontal, _
Left:=100, Top:=100, Width:=200, Height:=50).TextFrame _
.TextRange.Text = "Test Box"

这会返回

Run-time error '448':
Named argument not found

文档是否错误或者我遗漏了什么?

最佳答案

Type:= 替换为 Orientation:=

关于vba - PowerPoint VBA 宏给出运行时错误 448 : Named argument not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30875342/

相关文章:

c# - 使用 Python 与 C# 创建 PPT 演示文稿

excel - VBA将符合条件的行复制到另一个工作表

excel - 将嵌入的 Word 文档另存为 PDF

vba - 即使格式化为文本,Excel 也会将 "64E0113"样式代码读取为数字 "6.4E+114"

excel - 如何以编程方式重新启用 MS Office 禁用文件列表中的文档

vba - 使用随机数进行计算

c# - 我是否需要为我的 powerpoint 加载项安装 Microsoft Visual Studio 2010 Tools for Office Runtime(x86 和 x64)?

c++ - OLE:多个 OLE 对象的共享 IStorage?

excel - 如何在不为每个行分配按钮的情况下向行添加交互?

sql-server - 服务器升级后 Excel 宏上发生 SSL 安全错误