Coping data from excel to word

O

Oggy

Hi

I am writing a macro in excel to copy data from a cell and put it in
a
new word document. I have managed this OK, but i am struggling to
find
a code that copies a group of cells together, IE all the data in
cells G10:L2000


Has anyone got any suggestions for me?


Thanks


Oggy
 
J

JLGWhiz

I got this from mrexcel.com website:

Range("A1:F15").Copy
' Tell Word to create a new document
appWD.Documents.Add
' Tell Word to paste the contents of the clipboard into the new
document
appWD.Selection.Paste

Reaching back a few years, to put this in a specific place in a word
document with text, you would need to know the paragraph and line reference,
and use collapse.
I never tried it with a table so I can't help much there. Check out the
mrexcel.com site.
 

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