Dim ShapeItem, ShapeItem1 As Shape
Dim s, s1 As Shapes
ActiveDocument.Unit = cdrMillimeter
Set s = ActiveSelection.Shapes.Item(2).Shapes
Set s1 = ActiveSelection.Shapes.Item(1).Shapes
For Each ShapeItem In s
For Each ShapeItem1 In s1
If ShapeItem.SizeWidth = ShapeItem1.SizeWidth And ShapeItem.SizeHeight = ShapeItem1.SizeHeight Then
ShapeItem1.Move ShapeItem.PositionX - ShapeItem1.PositionX, ShapeItem.PositionY - ShapeItem1.PositionY
ShapeItem1.Cut
ActiveLayer.Paste
Exit For
End If
Next ShapeItem1
Next ShapeItem
哪位高手帮看看,s1里对像怎么样去掉,现在用cut,paste,图形多了就不行了,能不能直接在s1里去掉已比较过的shapeitem1,这样s里的对象再比较就不会有重复的图形了
Dim s, s1 As Shapes
ActiveDocument.Unit = cdrMillimeter
Set s = ActiveSelection.Shapes.Item(2).Shapes
Set s1 = ActiveSelection.Shapes.Item(1).Shapes
For Each ShapeItem In s
For Each ShapeItem1 In s1
If ShapeItem.SizeWidth = ShapeItem1.SizeWidth And ShapeItem.SizeHeight = ShapeItem1.SizeHeight Then
ShapeItem1.Move ShapeItem.PositionX - ShapeItem1.PositionX, ShapeItem.PositionY - ShapeItem1.PositionY
ShapeItem1.Cut
ActiveLayer.Paste
Exit For
End If
Next ShapeItem1
Next ShapeItem
哪位高手帮看看,s1里对像怎么样去掉,现在用cut,paste,图形多了就不行了,能不能直接在s1里去掉已比较过的shapeitem1,这样s里的对象再比较就不会有重复的图形了
把右边彩色图同左边相同尺寸的移到左边重叠一起
