Copying excel charts into word

mawjcullen

New Member
Joined
Oct 27, 2004
Messages
12
As stated above my problem is that the code as recommended by a previous post on this subject doesn't work because I am creating the Word document and so do not have any bookmarks to use as a range. What can I do? The problem is the PasteAndFormat line. I get a command Not Available comment back

Dim objApp As Word.Application
Dim Chart1 As Variant

Set objApp = CreateObject("Word.Application")
objApp.Options.SavePropertiesPrompt = False


With objApp
.Visible = True
.Documents.Add

Set Chart1 = ActiveSheet.ChartObjects(1)
Chart1.Copy

.Selection.PasteAndFormat Type:=13
End With


objApp.Quit
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Depending on what you want, try:

Selection.Paste

Selection.PasteSpecial Link:=False, DataType:=wdPasteEnhancedMetafile, _
Placement:=wdFloatOverText, DisplayAsIcon:=False

Selection.PasteSpecial Link:=False, DataType:=wdPasteOLEObject, Placement _
:=wdFloatOverText, DisplayAsIcon:=False

That's what the (Word) macro recoreder gave me when I pasted an Excel chart into a new document.
 
Upvote 0
Depending on what you want, try:

Selection.Paste

Selection.PasteSpecial Link:=False, DataType:=wdPasteEnhancedMetafile, _
Placement:=wdFloatOverText, DisplayAsIcon:=False

Selection.PasteSpecial Link:=False, DataType:=wdPasteOLEObject, Placement _
:=wdFloatOverText, DisplayAsIcon:=False

That's what the (Word) macro recoreder gave me when I pasted an Excel chart into a new document.
 
Upvote 0

Forum statistics

Threads
1,203,073
Messages
6,053,381
Members
444,660
Latest member
Mingalsbe

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