question about - excel macro copy chart to word document

J

Jani

I wish to make an excel makro which append a chart to open word file.
(format as picture). Then it returns to excel. It would be useful
also to clear the clipboard after this.



I succeded to make makro which transfer chart to clipboard and then
make word as active.

In Tools - references I also assign Microsoft word 10.0 Object
library.

This macro is:

Sub Makro2()
'
Dim exc As Excel.Workbook, wor As Word.Application
ActiveChart.ChartArea.Copy
Set wor = GetObject(, "word.application")
wor.Visible = True
wor.Activate
End Sub

I please for macro, which will copy this chart to open word document.

Regards and thank for help
Jani
 
T

Tom Ogilvy

Just turn on the macro recorder in word, select you document and do edit
=>paste.

That should give you the code you want.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top