|
- Sub daochutp()
- Dim nm$, myFolder$
- Dim n As Long
- Dim str As String
- ' On Error Resume Next
- Application.ScreenUpdating = False
- n = Cells(2, 10).Value
- For Each shp In ActiveSheet.Shapes
- If shp.Type = 13 Then
- n = n + 46
- myFolder = ThisWorkbook.Path & "" & Cells(n + 1, 10).Value & ""
- If Len(Dir(myFolder, vbDirectory)) = 0 Then MkDir myFolder
- nm = Cells(n, 11).Value & ".jpg"
- shp.Copy
- With ActiveSheet.ChartObjects.Add(0, 0, shp.Width + 2, shp.Height + 2).Chart
- .Paste
- .Export myFolder & nm ' & ".jpg", "JPG"
- .Parent.Delete
- End With
- End If
- Next
- End Sub
复制代码 |
|