如何批量从多个excel里提取图片
Sub 提取图片()
Dim sht As Worksheet, sht1 As Worksheet
Dim pic As Picture
Dim wb As Workbook
Application。 ScreenUpdating = False
wbname = ThisWorkbook。Name
Set sht1 = ThisWorkbook。ActiveSheet
mypath = ThisWorkbook。 Path & "\"
Filename = Dir(mypath & "*")
Do While Filename <> ""
If Filename <> wbname...全部
Sub 提取图片()
Dim sht As Worksheet, sht1 As Worksheet
Dim pic As Picture
Dim wb As Workbook
Application。
ScreenUpdating = False
wbname = ThisWorkbook。Name
Set sht1 = ThisWorkbook。ActiveSheet
mypath = ThisWorkbook。
Path & "\"
Filename = Dir(mypath & "*")
Do While Filename <> ""
If Filename <> wbname Then
Set wb = Workbooks。
Open(Filename:=mypath & Filename)
For Each sht In Sheets
sht。DrawingObjects。
Copy
sht1。Paste
Next
wb。Close
End If
Filename = Dir
Loop
Application。
ScreenUpdating = True
End Sub。收起