Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Insert Chart into Word
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Insert Chart into Word
"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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can not insert chart in Excel 2007? Chart does not work right? | Excel Discussion (Misc queries) | |||
How to insert a word document onto an Excel Chart | Excel Discussion (Misc queries) | |||
HOW TO INSERT A * BEFORE AND AFTER EACH WORD | Excel Worksheet Functions | |||
insert excel chart into word doc and keep landscape format? | Excel Discussion (Misc queries) | |||
=SUM Then insert word. | Excel Worksheet Functions |