M
Maynard
I posted this in the Excel programming NG, but to no avail...thought I'd try
it here.
I would like to have a macro (I'm actually writing it in Excel) that would
take the active chart and paste it into an open Word document at the current
location of the cursor. Unfortunately, I'm much more familiar w/ the Excel
object model than the Word object mode. I have the following code, but can't
quite figure out what object(s) need to go where the XXXX is. Oh, and I'm
more concerned about getting this to work rather than what's better
(imagefile, metafile, etc). Thanks in advance!
Sub PortToWord()
Dim WrdDoc As Word.Document
Set WrdDoc = Word.ActiveDocument
ActiveChart.Copy
WrdDoc.Range.PasteSpecial DataType:=wdPasteEnhancedMetafile,
DisplayAsIcon:=False
End Sub
it here.
I would like to have a macro (I'm actually writing it in Excel) that would
take the active chart and paste it into an open Word document at the current
location of the cursor. Unfortunately, I'm much more familiar w/ the Excel
object model than the Word object mode. I have the following code, but can't
quite figure out what object(s) need to go where the XXXX is. Oh, and I'm
more concerned about getting this to work rather than what's better
(imagefile, metafile, etc). Thanks in advance!
Sub PortToWord()
Dim WrdDoc As Word.Document
Set WrdDoc = Word.ActiveDocument
ActiveChart.Copy
WrdDoc.Range.PasteSpecial DataType:=wdPasteEnhancedMetafile,
DisplayAsIcon:=False
End Sub