Word Document that shows Excel Chart

B

Bryan Lenker

I'm guessing you want to open an excel workbook from
inside word using VBA. This code might help you get
started:

Dim wb As Workbook

Application.ScreenUpdating = False

Set wb = Workbooks.Open("c:\excel file.xls"))

'copy your chart to the clipboard

wb.Close False
Set wb = Nothing

'paste your chart into word

Application.ScreenUpdating = True

This code will open an excel file, but will keep it
hidden so the user can't see it being opened. I'm not
sure where the chart is located, but you should be able
to access the chart through VB and then copy it. Once
you have it copied, close excel and make word the active
app. Then you should be able to paste the chart.

If you have any problems, try recording a macro to
accomplish the same thing. Doing that sometimes gives
you some good hints...hope this helps.
 

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