返回首页
当前位置: 主页 > Excel教程 > Excel VBA教程 >

EXCEL 实现批量导出图片

时间:2012-06-17 02:54来源:Office教程学习网 www.office68.com编辑:麦田守望者

Sub ExportPictures()
Dim MyShp As Shape
Dim Filename As String
For Each MyShp In Sheet1.Shapes
If MyShp.Type = msoPicture Then
Filename = ThisWorkbook.Path & "\" & MyShp.Name & ".gif"
MyShp.Copy
With Sheet1.ChartObjects.Add(0, 0, MyShp.Width, MyShp.Height).Chart
.Paste
.Export Filename
.Parent.Delete
End With
End If
Next
Set MyShp = Nothing
End Sub

------分隔线----------------------------
标签(Tag):excel excel2007 excel2010 excel2003 excel技巧 excel教程 excel实例教程 excel2010技巧
------分隔线----------------------------
推荐内容
猜你感兴趣