View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Maynard Maynard is offline
external usenet poster
 
Posts: 8
Default Insert Chart into Word

Right now I'm just worried about pasting the chart into my document, not what
format is better.

"Fredrik Wahlgren" wrote:


"Maynard" wrote in message
...
I'm not sure if this should be posted here or in the Word NG, but...

I'm trying to write a macro that will copy a selected chart (in Excel)

into
an open Word Document (at the current location of the cursor).

Unfotunately,
I'm only familiar with the Excel object model, not the Word object model.

I
have the following code (but cant figure out what to put in XXXX). Of
course, I may be going about this completely the wrong way. Thanks for

any
help...

Sub PortToWord()

Dim WrdDoc As Word.Document

Set WrdDoc = Word.ActiveDocument
ActiveChart.Copy
WrdDoc.XXXX.PasteSpecial DataType:=wdPasteEnhancedMetafile,
DisplayAsIcon:=False


End Sub


Wouldn't it be better to paste the chart as an image file?

/Fredrik