Copying a range from excel into word

R

Rominall

I have an excel sheet in which there are several named ranges. I would like
to write a macro to copy the information, create a new word doc and then
paste into the new word doc. Do I write it from excel or from word. How do
I control the paste function?
 
R

Rominall

Thanks for the articles but when I add the code into the excel document I get
a "doesn't support this property or method"

Here's the code I have.
Dim appWD As Word.Application
Dim odoc As Word.Document
Range("A7:N7").Select
Selection.Copy
Application.CutCopyMode = False

Set appWD = CreateObject("Word.Application")

Set odoc = appWD.Documents.Add
WordBasic.EditOfficeClipboard
Selection.PasteExcelTable False, False, False <==== this is where it
error's out


Set appWD = Nothing


Would it be easier to do this from word?
 
D

Doug Robbins - Word MVP

Use

odoc.Range.PasteExcelTable False, False, False


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

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