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

相关推荐
小真zzz1 小时前
2026年免费AI PPT工具深度评测:多款实用工具推荐
人工智能·搜索引擎·ai·powerpoint·ppt
神码观察4 天前
WorkBuddy高效制作PPT与交互式课件实操指南
powerpoint
SpaceAIGlobal4 天前
医护人员使用AI生成PPT:如何保证原始数据不被篡改?
人工智能·powerpoint
cyhysr5 天前
Python读取ppt文本转存txt
python·powerpoint
A懿轩A5 天前
【NotebookLM 使用教程】 Slides 指令库:11套通用PPT风格Prompt(含中英文对照)
python·prompt·powerpoint·ppt·notebooklm
百事牛科技5 天前
高效办公技巧:如何取消PPT以“只读方式”打开?
windows·powerpoint
aosky6 天前
可以白嫖的Nano Banana2 字节跳动出品可以写ppt,写网页,做设计....
人工智能·数据分析·powerpoint
xiami_world6 天前
AI生成PPT工具技术横评:Agent专家模式如何重构PPT生成工作流(6款工具实测)
人工智能·经验分享·ai·信息可视化·powerpoint
chatexcel6 天前
AI生成PPT工具哪个好?2026主流AIPPT工具实测对比
人工智能·powerpoint
Fariy*8 天前
述职PPT应该怎么写!?
powerpoint