删除ppt文件内所有同一位置的内容
生活随笔
收集整理的這篇文章主要介紹了
删除ppt文件内所有同一位置的内容
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
轉載遵循 CC 4.0 BY-SA 版權協議
在視圖中創(chuàng)建宏,然后選中要刪除的區(qū)域和內容,運行宏。done。
Sub Test()Dim oSlide As Slide, oShape As Shape Dim myWidth As Single, myHeight As Single, myTop As Single, myLeft As SingleOn 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 IfSet oShape = ActiveWindow.Selection.ShapeRange(1) myTop = oShape.Top myLeft = oShape.Left myHeight = oShape.Height myWidth = oShape.WidthFor 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總結
以上是生活随笔為你收集整理的删除ppt文件内所有同一位置的内容的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 水稻PHP基因,科学网—38个水稻全基因
- 下一篇: 漫画|图灵奖是怎么来的?