PPT 批量删除每页相同位置的内容

方法:

选择【视图】,【宏】,设置宏的名称,点创建
将下列函数复制到宏中,在ppt中先选择某个要删除的对象,然后运行宏即可

函数内容如下

Sub Delete( )

Dim oSlide As Slide, oShape As Shape

Dim myWidth As Single, myHeight As Single, myTop As Single, myLeft As Single

On Error Resume Next

If ActiveWindow.Selection.ShapeRange.Count <> 1 Then

If Err.Number <> 0 Then

MsgBox "none" & vbCrLf & "choose one", vbExclamation + vbOKOnly

Err.Clear

Exit Sub

End If

MsgBox "choose exceed 1" & vbCrLf & "choose one", vbExclamation + vbOKOnly

Exit Sub

End If

Set oShape = ActiveWindow.Selection.ShapeRange(1)

myTop = oShape.Top

myLeft = oShape.Left

myHeight = oShape.Height

myWidth = oShape.Width

For Each oSlide In ActivePresentation.Slides

For Each oShape In oSlide.Shapes

If Abs(myTop - oShape.Top) < 1 And Abs(myLeft - oShape.Left) < 1 And Abs(myHeight - oShape.Height) < 1 And Abs(myWidth - oShape.Width) < 1 Then

oShape.Delete

End If

Next

Next

End Sub

相关推荐
死磕音视频14 小时前
PowerPoint Copilot 入门:用 Interactive Slide 做出可点击讲解页
powerpoint·copilot·演示文稿·交互幻灯片
FinelyYang16 小时前
uniapp使用kkfileview在线预览ppt,excel,word,pdf类型文件
pdf·uni-app·powerpoint
zhippt_101417 小时前
截图、课件图、设计稿怎么变成可编辑PPT?图转PPT实测
powerpoint
ms365copilot2 天前
Copilot 笔记本,研究内容整理完变成 PowerPoint
powerpoint·copilot
jcqcool3 天前
win11下ppt内置的Flash 动画还直接能动起来:我做了一个 兼容播放小工具
powerpoint
zhippt_10143 天前
只剩截图没有源文件?图转PPT把图片还原成可编辑幻灯片
前端·人工智能·powerpoint
zhippt_10144 天前
教师做课件太耗时?AI生成PPT工具与图转PPT实测梳理
人工智能·html·powerpoint
zhippt_10145 天前
汇报总结PPT怎么做更快?5款AI生成PPT工具实测横评
人工智能·powerpoint
copilot中国版6 天前
PPT 新技能「创建项目启动会」:项目还没开会,Copilot 先把启动会 PPT 搭好了
powerpoint·copilot
●VON7 天前
芯稿 MarkDeck:在 HarmonyOS PC 上用 Markdown 生成可编辑 PPT
华为·powerpoint·harmonyos