我正在浏览Powerpoint幻灯片1中的形状
当名称为“ HD”的形状被删除时,下一个形状将变为“ SD”,跳过“ 4K”。如果删除了“ 4K”,则下一个形状变为“ FullHD”
如何避免这种情况?
For Each pshape In ppres.Slides(1).Shapes
Select Case pshape.Name
Case "HD"
Debug.Print vbTab & pshape.Name
If LCase(Cells(2, titleHeader.ListColumns("Nature of Material*").Index)) <> "hd" And LCase(Cells(2, titleHeader.ListColumns("Nature of Material*").Index)) = "" Then
pshape.Delete
End If
Case "4K"
Debug.Print vbTab & pshape.Name
If LCase(Cells(2, titleHeader.ListColumns("Nature of Material*").Index)) <> "4k" And LCase(Cells(2, titleHeader.ListColumns("Nature of Material*").Index)) = "" Then
pshape.Delete
End If
Case "SD"
Debug.Print vbTab & pshape.Name
Case "FullHD"
Debug.Print vbTab & pshape.Name
Debug.Print vbTab & Cells(2, …Run Code Online (Sandbox Code Playgroud)