ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Coping data from excel to word (https://www.excelbanter.com/excel-programming/387437-coping-data-excel-word.html)

Oggy

Coping data from excel to word
 
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


JLGWhiz

Coping data from excel to word
 
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.


"Oggy" wrote:

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




All times are GMT +1. The time now is 10:09 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com