批量删去PPT中每页相同位置的图片、文字等方法一:修改ppt母版方法二:宏处理1.视图-----宏-----宏名(随便输入)-----创建2 . 粘贴以下的代码:Sub Laosiji()Dim oSlide As Slide, oShape As ShapeDim my Width As Single, myHeight As Single, myTop As Single, myLeft As S ingleOn Error Resume NextIf ActiveWindow.Selection.ShapeRange.Cou nt <> 1 ThenIf Err.Number <> 0 ThenMsgBox "Meiyou" & vbCrLf & "La osji666", vbExclamation + vbOKOnlyErr.ClearExit SubEnd IfMsgBox " zailaiyige" & vbCrLf & "Laosji666", vbExclamation + vbOKOnlyExit SubEnd IfSet oShape = ActiveWindow.Selection.ShapeRange(1)myTop = oShape.TopmyLeft = oShape.LeftmyHeight = oShape.HeightmyWidth = oShape.WidthFor Each oSlide In ActivePresentation.SlidesFor Each oShape In oSlide.ShapesIf Abs(myTop - oShape.Top) < 1 And Abs(myL eft - oShape.Left) < 1 And Abs(myHeight - oShape.Height) < 1 And Abs(myWidth - oShape.Width) < 1 ThenoShape.DeleteEnd IfNextNextEn d Sub3.关闭宏4.打开要处理的ppt,选中要处理的每页相同位置的图片、文字等5. 视图-----宏-----选择宏名---- -运行 |
|