Can I Import Graphs from Excel?

B

Brent E

Good afternoon everybody,

I am working on a program for my boss and need to write a macro that can
copy graphs from seperate sheets in an Excel workbook and paste them onto a
Word document.

Does anybody know a VBA procedure that can do this?
 
S

Shauna Kelly

Hi Brent

Yes, you can do this, but it won't be straight forward.

You can control Word from Excel, or you can control Excel from Word. For
information on how to do that, see
Control Excel from Word
http://www.mvps.org/word/FAQs/InterDev/ControlXLFromWord.htm

You then need some way to identify which graph to copy, and where to place
it in the Word document.

You'll also have to decide in what format to paste the graph, and whether it
should be floating or in-line in Word. I'd suggest you start with pasting as
a picture, in-line. That's probably the least troublesome way. If that
doesn't suit your needs, modify the pasting after you get everything else
working.

If you have follow-up questions, you might be better placed posting
questions to the microsoft.public.word.vba.general newsgroup. If you do
that, be sure to let them know what version of Word and Excel you're using.

Hope this helps.

Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word
 

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