VBA copy image from excel sheet to word doc

simba24d

New Member
Joined
Jan 21, 2011
Messages
14
Hi all,

I'm trying to copy an image that is present on excel sheet to a word doc.
I know that to copy a chart

With ActiveSheet.ChartObjects(1).Chart
.CopyPicture Appearance:=xlScreen, Size:=xlScreen, Format:=xlPicture
Paste chart
wrdDoc.Paragraphs(wrdDoc.Paragraphs.Count).Range.PasteSpecial Link:=False, DataType:=wdPasteMetafilePicture, Placement:=wdInLine, DisplayAsIcon:=False
End With

but what about an image (jpg/gif/...) that has been inserted in the active sheet?

Thanks for the support
 
What if i have two picture and two chart in the sheet. How can copy all of this into words?

What wrong with my code below?

Sub exportallxlpicture()
Dim sht As Worksheet, appwd As Shape
For Each sht In ActiveWorkbook.Sheets
For Each appwd In sht.Shapes
appwd.Shapes.Export "C:\temp\" & sht.Name & appwd.Name & ".jpg", "JPG"
Next appwd
Next sht
End Sub


Help!!
 
Upvote 0

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

Forum statistics

Threads
1,224,518
Messages
6,179,258
Members
452,901
Latest member
LisaGo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top