Doug
Wed Feb 15 12:58:34 CST 2006
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
"Rominall" <Rominall@discussions.microsoft.com> wrote in message
news:CBAE9894-B0F3-47E5-8167-761BF7D4924B@microsoft.com...
> 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?
>
>
> "Doug Robbins - Word MVP" wrote:
>
>> See the article "Control Excel from Word" at:
>>
>>
http://www.word.mvps.org/FAQs/InterDev/ControlXLFromWord.htm
>>
>> or
>>
>> "Control Word from Excel" at:
>>
>>
http://www.word.mvps.org/FAQs/InterDev/ControlWordFromXL.htm
>>
>>
>> --
>> 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
>>
>> "Rominall" <Rominall@discussions.microsoft.com> wrote in message
>> news:D57CFE00-865E-4BC3-A284-63070251C3B1@microsoft.com...
>> >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?
>>
>>
>>