圖一
Sub yy()
Dim j%
Application.ScreenUpdating = False
For i = 2 To [a65536].End(xlUp).Row
For Each p In ActiveSheet.Shapes
If Not Application.Intersect(p.TopLeftCell, Cells(i, 3)) Is Nothing Then
p.Name = Format(j, "00") & ".jpg"
p.CopyPicture
ActiveSheet.Paste
With ActiveSheet.ChartObjects.Add(300, 0, Selection.Width, Selection.Height).Chart
.Paste
.Export "\\pcbfs02\C701\生產指示卡圖檔\" & p.Name, "JPG"
Selection.Delete
.Parent.Delete
End With
Application.ScreenUpdating = True
j = j + 1
End If
Next p
Next i
End Sub作者: luhpro 時間: 2019-3-5 23:01