excel - 运行时错误“-2147188160 (80048240)”:形状(未知数字):无效请求。剪贴板为空或包含可能无法在此处粘贴的数据
问题描述
我有一个 Excel 工作簿,我想使用 VBA 将 sheet1 中的表格导出到 PowerPoint。下面是我的代码,但我收到了错误消息作为磁贴。谁能帮我解决这个问题?
提前致谢。
Option Explicit
Sub Module1()
Dim ppApp As PowerPoint.Application
Dim ppPres As PowerPoint.Presentation
Dim ppSlide As PowerPoint.Slide
Set ppApp = New PowerPoint.Application
ppApp.Visible = True
ppApp.Activate
Set ppPres = ppApp.Presentations.Add
Set ppSlide = ppPres.Slides.Add(1, ppLayoutBlank)
ppSlide.Select
Range("A1").CurrentRegion.Copy
ppSlide.Shapes.Paste
End Sub
解决方案
推荐阅读
- python - Pycharm通过脚本运行导入命令时无法导入torch,但可以在控制台导入使用
- django - 如何在 Django 中将 CharField 的查询集过滤为 Int?
- xml - 如何使用 XPath 从 XML 中的相似元素中读取多个嵌套节点?
- performance - 协程中的 waitforseconds 是否与 sephamore.WaitForSignal 相关?
- iis - IIS URL 重写存在非英文字符的问题
- c - Proper methods to Copy files/folders programmatically in C using POSIX functions
- linux-kernel - 平台设备和平台驱动链接
- php - How to convert string to boolean multiple condition in PHP
- java - Not able to map Json to java Object using Jackson and lombok
- google-cloud-platform - GCP API Gateway authentication between services without using service account private key